CloudVPS Backup Script Installation and Updates

Below you can find the relevant parts of the CloudVPS Backup Script documentation. Download the full backup script documentation (PDF)

The following knowledgebase pages about the CloudVPS Backup Script could also be relevant:
CloudVPS Backup Script Introduction
Configuration and Restoring Backups

Knowledge requirements

Since our backup tools are written in Bash and all have to be executed via a terminal, some basic knowledge is needed to use the tools.

We assume that you know:

  • How to set up a SSH connection to your server
  • How to navigate within the terminal
  • How to work within the  “nano” editor
Software requirements

We have tested our set of scripts on various platforms and confirm that the following distributions are supported:

  • CentOS 5
  • CentOS 6
  • Debian 5
  • Debian 6
  • Fedora 15 and higher
  • Ubuntu 10.04
  • Ubuntu 10.10
  • Ubuntu 11.04
  • Ubuntu 11.10
  • Ubuntu 12.04

The following operating systems are not supported (due to deprecated packages):

  • CentOS 4 or lower
  • Debian 4 or lower
  • Ubuntu 9.10 or lower

The following operating systems are untested and unsupported:

  • Gentoo
  • Minix
  • Solaris
  • Slackware
  • FreeBSD
  • (Open)Suse

The following control panels are supported (for MySQL dumps):

  • DirectAdmin
  • cPanel / WHM
  • Plesk
  • OpenPanel
  • OpenApp
  • ISPConfig 3

The software requirements are:

  • Rsync (at least version 3)
  • Curl
  • Mailx
  • Sendmail
  • Perl
  • Expect
  • Bc
  • Sshfs
  • Midnight Commander
  • Nano editor

The following firewall is supported:

  • CSF (ConfigServer Security & Firewall)
Upgrade requirements

In order to upgrade to the newest version of the backupscript, you must meet the following requirements:

  • CloudVPS Backupscript version 2.0.1 – 2.0.9.
  • XLS Backupscript version 1.6.

This installer does not support the following script versions:

  • XLS Backupscript version 1.2 – 1.5.
  • The first XLS Backupscript, without the configuration file.

If you have the XLS Backupscript version 1.5 – 1.2 installed, you should undertake the following steps to upgrade to version 2.0.9. From there you can use this installer to update to the newest release (note that it's 1 line!):

wget -O cloudvps-backup-installer-old http://download.cloudvps.com/pub/sites/default/files/images/cloudvps_ima...

Next, make it executable:

chmod +x cloudvps-backup-installer-old

And start the installer:

./cloudvps-backup-installer-old –update

Once the update is finished, you can continue using the new installer.  First remove the old installer, you won't need that anymore:

rm ./cloudvps-backup-installer-old

Download / prepare the installation script

All operations are based on the CloudVPS Backup installation script, therefore you need to download and prepare the script for usage:

First download the script (note that it's 1 line!):

curl -o cloudvps-backup-installer.sh http://download.cloudvps.com/pub/sites/default/files/images/cloudvps_ima...

Next, make it executable:

chmod +x cloudvps-backup-installer.sh

And start the installer:

./cloudvps-backup-installer.sh

The installer will check to see if all required packages are present on the system or will install them for you:

============================================================
=       CloudVPS Backup Installation Script V3.2.0         =
============================================================

Operating System detected: Debian / Ubuntu

Checking if needed packages are present on the system:

Update APT packagelist: OK   
Checking for dialog: Present
Checking for curl: Present
Checking for rsync: Present
Checking for sendmail: Present
Checking for mailx: Present
Checking for bc: Present
Checking for expect: Present
Checking for Perl: Present
Checking for mc: Present
Checking for sshfs: Present
Checking for nano: Present

The main menu (prior to installation)

Once all requirements are met you are presented with the main menu:

 

 

 

 

 

As you can see there are some numbers missing from the menu, this is because the script has not been installed yet and therefore is not showing any unrelated options for now.

We can now continue with the installation, it's up to you to decide whether you use the easy or the advanced installer.

The easy installer will make almost all choices for you and only asks for the details it needs, like the backupserver, password and emailaddress. The other actions and decisions like logging and such are handled by the script.
The easy installer is recommended for everyone and normally works in all cases.

The advanced installer, however, leaves you with all options open for you to use. You can change the SSH port, SSH-key, remote path or the local path for example.
The advanced installer is recommended for power users who need to fine-tune their backup installation.

The easy installer

From the main menu, select option 1 and select “OK”, you will be presented with the following installation menu:

 

 

 

 

 

 

 

Login credentials:
Please fill in the backup username/server and password in the appropriate fields.

Root directory:
This is the directory from which the backups are made and is defined as an absolute (full) path. By default / is sufficient, which will backup the whole filesystem.

Note that if you change this, change the SQL backup directory as well, it has to be within the backup root directory, else the dumps will not be copied!

Retention:
For the retention, please take note of the calculation behind the input field! This defines the extra space that is used per retention option that you define. In this case, when setting this to 4 weeks, for example, would take at least 100 GB of extra space on the backupserver.

MySQL dumps:
If one of the supporting control panels is detected, this will be enabled by default, else it will default to “N” (also when MySQL is not installed on the system).

Scheduler:
The script automatically generates a random schedule time between 0:00 and 09:00. Should you wish to run the script at a different time, change it in the appropriate fields.

Email addresses:
2 addresses can be defined, where the “Backup report email” is the general report that the backupscript produces. The “Alerts email” is the address to which notifications, alerts and errors are  sent, so this address may differ from the reports address.

Once all fields are filled with their correct values, select “OK” and the script will prepare and install the backupscript for you and create a crontab entry.

After the installation you can have a short installation report sent via email. This will be sent to the reports email address given during the installation.

Extensive logging:
This will enable the logging functionality of rsync, which will create backup logs per session and will be placed in /var/log/backups/. Enabling the logs will provide better insight when problems occur, but can become quite large, despite the gzip compression that will be used for the logs.

Send reports:
The script normally sets up the  reports email address in the cronjob that will be created. If you wish not to receive the reports (and therefore only will receive warnings and errors when they occur) set this to “N”, else to “Y”. When set to “N”, you are asked to enter an email address nonetheless.  This will be saved into the configuration file for future purposes.

By default we have set this to “N”, therefore the script will only email on the alerts emailaddress when there are notifications, warnings or errors. This results in much less emails being sent by the script and will only receive emails when action is required!

Commandline installation:
Commandline installation is also possible, see page 37 for more information.

The advanced installer

From the main menu, select option 2 and select “OK”, you will be presented with the following installation menu:

 

 

 

 

 

 

 

 

Login credentials:
Please fill in the backup username/server and password in the appropriate fields.

Root directory:
This is the directory from which the backups are made and is defined as an absolute (full) path. By default / is sufficient, which will backup the whole filesystem.

Remote path:
This is the directory where the backups are placed and must contain an absolute path.

SSH Keyfile and port:
Here you can define the SSH keyfile that will be used and you can change the SSH port, should SSH run on another port on the backupserver.

Retention:
For the retention, please take note of the calculation behind the input field.

This calculates the extra space that is used per retention option that you define. For example, in this case,  setting this to 4 weeks, would take at least 100 GB of extra space on the backup server.

MySQL dumps:
If one of the supporting control panels is detected, this will be enabled by default, otherwise it will default to “N” (also when MySQL is not installed).

Scheduler:
The script automatically generates a random schedule time between 0:00 and 09:00. If you wish to run the script at a different time, you can change it in the appropriate fields.

Notifications:
By default the notification system is active.  This will send out alerts, warnings and error messages via email. if you don't want to see them, simply set this flag to “N”.

Please note that disabling the notification system can cause severe damage to your backups in such a way that you won't be alerted if any critical errors occur during the backup.  We strongly recommend to leave it at “Y”.

Verbose logging:
The script can save the output of the rsync transfer log in .gz format for reference. This may be useful if you doubt that all files are being copied to the backup server.

Transfer speed:
The transfer speed is adjustable to a max of 12,5 MB/sec (100 Mbps/sec). This is limited to make sure that the rsync process won't stress the system too much. By default the 3000 KB/sec setting is enough for regular backups; if you backup a large number of files or in size it can be helpful to increase this number.

Automatic updates:
We often push updates for our backup suite which solve bugs or include new features. By default this flag is set to “Y” to ensure that when an update is found this is automatically applied for you. Should you not wish to use the automatic update system, please set it to “N”.

Please note that disabling the automatic update system will result in updates no longer being applied. In this case you have to update the backupscript manually. If you have made modifications to the backup script, do not use the updater as this will overwrite your changes.

Email addresses:
2 addresses can be defined, where the “Backup report email” is the general report that the backup script produces. The “Alerts email” is the address to which notifications, alerts and errors are sent. This address may differ from the reports address.

Send reports:
The script normally sets up the  reports email address in the cronjob that is created. If you wish not to receive the reports (and therefore will receive only warnings and errors in case they occur) set this to “N”, otherwise to “Y”. When set to “N”, you are asked to enter an email address nonetheless. This will be saved into the configuration file for future purposes.

By default we have set this to “N”. Therefore the script will only email on the alerts email address when there are notifications, warnings or errors. This results in much less emails being sent by the script and this way you will only receive emails when action is required.

Once all fields are filled with their correct values, select “OK” and the script will prepare and install the backup script for you and create a crontab entry.

After the installation you can have a short installation report sent via email. This will be sent to the reports email address.

The main menu (after installation)

Once the backup script has been installed, the main menu will show all other options that were not available before the installation:

 

 

 

 

 

 

 

The options shown above will be explained in the next pages.

The configuration editor

From the main menu, select option 3 and select “OK”, you will be presented with the following menu:

 

 

 

 

 

 

 

 

The window will show all current settings that are saved in the backup configuration file.

As you can see it is possible to change the content of the fields and therefore let's you edit the configuration details regarding the backup.

Retention:
It's possible to lower or increase the retention, here you need to check the space warning as well, since adding retention takes up the amount of space that's besides that field.

Please note that upon lowering the retention, this will not remove the old retention from the backupserver, you have to do this manually on the backupserver in the -weekly and -monthly folders!

MySQL dumps:
It's possible to enable or disable the MySQL dump functionality, when a supported controlpanel is found on the server, the correct details regarding username/password are automatically filled in the correct fields and MySQL dumps are enabled. You can disable then by setting the flag to “N”, you don't have to clear the username/password fields, the backupscript will simply ignore them when the dumps are disabled.

When no supported controlpanel or MySQL is found, the script puts the flag to “N” and places “none” as username/password, which can be left this way.

Notifications:
By default the notification system is active. This will send out alerts, warnings and error messages via email.  If you don't want to see them, simply set this flag to “N”.

Please note that disabling the notification system can cause severe damage to your backups in such a way that you won't be alerted if any critical errors occur during the backup We strongly recommend to leave it at “Y”.

Verbose logging:
The script can save the output of the rsync transfer log in .gz format for reference. This may be useful if you doubt that all files are being copied to the backup server.

Transfer speed:
The transfer speed is also adjustable to a max of 12,5 MB/sec (100 Mbps/sec). This is limited to make sure that the rsync process won't stress the system too much. By default the 3000 KB/sec setting is enough for regular backups; if you backup a large number of files or in size it can be useful to increase  this number.

Automatic updates:
We often push updates for our backup suite which solve bugs or include new features. By default this flag is set to “Y” to ensure that when an update is found this is automatically applied for you. Should you not wish to use the automatic update system, please set it to “N”.

Please note that disabling the automatic update system will result in updates no longer being applied. In this case you have to update the backupscript manually. If you have made modifications to the backupscript, do not use the updater as this will overwrite your changes.

Alert email address:
The alert notifications that are sent via email can be sent to multiple recipients. This can be managed from  the “Mail recipients” option in the main menu.

Uninstall the backupscript

If you don't want to use the backupscript anymore you can uninstall it with this option and you are asked to confirm the following question:

 

 

 

 

When you agree, all parts of the backupscript installation will be removed, including all files in /etc/cloudvps/ and the script itself with the cronjob.

Cronjob:
In earlier versions it was not possible to remove the cronjob automatically. This has been changed in this version: when uninstalling the script, the cron is now also removed.

Command line uninstall:
Command line uninstall is also possible, see page 37 of the full manual for more information.


Update the backupscript

Updates are being checked once a month, but should you wish to check manually for updates you can use this function.

This will check with our download server to see if an update is available, if so, you can apply this update and the installer will patch everything needed to make sure the new script runs without problems.

If any update is available, you will see a window like this:

 

 

 

 

If you wish, you can read the change log prior to upgrading.

Command line update:
Command line update is also possible, see page 37of the full manual for more information.

Helpcenter

General FAQ

Show all FAQs

OpenStack FAQ

Show all FAQs

Knowledgebase

Show all FAQs