CloudVPS Backup Manual
Index
Cover 1 Index 2 Preface 3 Software requirements 4
Installation of the backupscript (easy) 5 Installation of the backupscript (advanced) 7
Configuration editor 9
Uninstall the backupscript 10
Show quota usage 11
Quota calculator 12
Update backupscript 13
Upgrade from previous versions 14
Clear old backup logfiles 15
Testing your configuration 16
Running the backup manually 17
Recovering data from backup 18
Help functionality 20
Support 21
Filing bugs, issues and feature requests 22
Glossary 23
Disclaimer 24
Preface
The CloudVPS backup installer is a multifunctional tool providing a simple and easy to use interface to manage the backups on your machine.
Within the tool it is possible to edit your configuration, run the backupscript manually and recover your lost data from the backupserver.
This and many other functions are provided within this tool; please see the index
System requirements
This installer and related scripts are tested officially on the following operating systems: -‐ CentOS 5 -‐ CentOS 6 -‐ Debian 5 -‐ Debian 6 -‐ Ubuntu 10.04 -‐ Ubuntu 10.10 -‐ Ubuntu 11.04 -‐ Ubuntu 11.10
The following operating systems are not supported due to incompatibility or testing issues (but might work if fixed manually):
-‐ Gentoo -‐ Minix -‐ Solaris
-‐ CentOS 4 or lower -‐ Ubuntu 9.10 or lower -‐ Debian 4 or lower
The following control panels are supported (for MySQL dumps): -‐ DirectAdmin -‐ cPanel / WHM -‐ Plesk -‐ OpenPanel -‐ OpenApp
The software requirements are:
-‐ Rsync (version 3.0.0 or higher) -‐ Curl (for version update checks)
-‐ Mailx (mail transport agent for sending mails via command line) -‐ Sendmail (actual mail sender)
-‐ Perl (for substitution, used in configuration editor)
-‐ Expect (for automatic password exchange when copying SSH key) -‐ Bc (calculator tool used for quota calculations)
Installation of the backupscript
(easy)
The easy installer will install the backup script for you, only asking for your backup credentials and your email address, any extra configuration steps will automatically be applied by the installer.
Downloading and running the tool:
First we need to download and run the tool in order to install the backupscript, issue the following commands:
wget –O cloudvps-backup-installer
http://download.cloudvps.com/pub/files/scripts/backup/cloudvps-backup-installer.txt
chmod +x cloudvps-backup-installer ./cloudvps-backup-installer
The menu presented will not show all options that are available, only the necessary items are displayed for now:
Please select option 1 and select OK.
The installer will now try to install all required software (see page 4 for details) and when it’s finished installing the software, you’ll be presented with the following menu:
Please supply the following details in the appropriate fields: -‐ Username
-‐ Password -‐ Backupserver -‐ Email address
When done, select OK and the script will start installing the backupscript on your server.
At the end, upon finishing installation, the script will ask you to send a simple installation report to the given email address, please select the option you want. (It’s always a good idea to send the report to ensure that the mail function works!)
Now the backup installation is finished!
Note:
In addition, it checks to see if MySQL is installed and if the configuration is readable. If so, the dump flag will be set to “Y” and else to “N”.
In the easy mode the automatic update option is enabled to ensure that you always have the latest backupscript installed. These updates are checked once a month and applied if yes. This can be disabled later via the configuration editor.
Installation of the backupscript
(advanced)
Should you need more control over the installation aspects of the backupscript, you can use the advanced installer.
Downloading and running the tool:
First we need to download and run the tool in order to install the backupscript, issue the following commands:
wget –O cloudvps-backup-installer
http://download.cloudvps.com/pub/files/scripts/backup/cloudvps-backup-installer.txt
chmod +x cloudvps-backup-installer ./cloudvps-backup-installer
The menu presented will not show all options that are available, only the necessary items are displayed for now:
Please fill in all the details, the only fields that optionally may be left blank are the MySQL user details, all other fields must be populated!
When done, select OK and the script will start installing the backupscript on your server.
At the end, upon finishing installation, the script will ask you to send a simple installation report to the given email address, please select the option you want. (it’s always a good idea to send the report to ensure that the mail function works!)
Now the backup installation is finished!
Note:
If you disable the notification system, the following notifications will not be sent: -‐ Update checks
-‐ Log mails
-‐ Full account mails
In addition, it checks to see if MySQL is installed and if the configuration is readable. If so, the dump flag will be set to “Y” and else to “N”. Should it display “Y” but no MySQL user details, please provide the details in the appropriate fields or set it to “N” manually if you don’t want the MySQL backup to be enabled.
It’s also a good idea to leave the automatic update option enabled to ensure that you always have the latest backupscript installed. These updates are checked once a month and applied if yes. Disabling this will only send an email notifying you about the update and how you should apply it.
Configuration editor
In order to use the configuration editor you need to have the backupscript installed, please refer to page 5 or 7 for the installation steps.
The configuration editor can be used to alter some configuration options regarding your backupscript, like the retention settings or the MySQL dump functionality.
To edit or view your current configuration details, run the backup installer and select option 3, which will show the following menu:
Change any configuration details that need to be changed and select OK. The settings are saved immediately.
Note:
When changing the email address, this will only change the email address to where the notifications are sent. The email address in the crontab cannot be changed using the configuration editor and should be edited by hand using the following command:
Uninstall the backupscript
In order to use the uninstaller you need to have the backupscript installed, please refer to page 5 or 7 for the installation steps.
The uninstaller function will remove the backupscript, its configuration files and the logs.
To uninstall the script, please run the installer and select option 4.
As a confirmation you’ll be presented with the following window:
Upon selection Yes, the script will be completely uninstalled and any traces of the script will be removed.
Note:
The uninstaller is not able to automatically remove the installed backup cronjob. In order to remove the cronjob, issue the following command and remove it manually:
crontab –e
Show quota usage
In order to calculate the current used quota you need to have the backupscript installed, please refer to page 5 or 7 for the installation steps.
In addition, quota support is only available for CloudVPS and the former XLS Hosting backupservers. Using your own backupserver will not provide any quota details.
With the quota usage system you can see a real time disk calculation of your backup account. It will log in, fetch the quota summary and parse it into readable format showing the results in a dialog window.
Quota calculator
The quota calculator is a good method to find out what the maximum retention is you can setup during the setup process.
Run the backup installer and select option 7, which will present the following menu:
Please enter the retention you wish and it will calculate the needed space on the backupserver, in this example we will suggest 2 weeks and 2 months extra retention, which in turn results:
This way you can adjust your retention and/or account size according to your needs.
Note:
The calculation made via this tool is a rough estimate of the space needed based on the given retention and the harddisk space the server currently has in use. We cannot be held responsible for any miscalculations made by this tool.
Update backupscript
This section applies to the part where you already have the 2.0 script or higher installed (via this tool). For upgrading instructions regarding previous scripts, see page 14.
We often post updates for the backupscript which will contain new functions or corrects bugs and software issues.
The update functionality will check for updates and will ask you to install them when available.
Please run the backup installer and select option 5. You will be asked if it should search for updates and if it finds an update it will show the following window:
Please select Yes and let the installer update the backupscript for you.
If you have the auto update function enabled then you should not need to run this part of the installer. The script will search for updates by itself once a month and install them should it find any.
Note:
The backup installer also checks for self-‐updates every time you run the installer to make sure you have the latest installer active and running. The update
dialogue is the same as for the backupscript.
Upgrade from previous versions
This section applies to users who are using the backupscripts prior to version 2. For upgrading instructions regarding the 2.X backupscript, please refer to page 13.
If you have the old XLS Backupscript installed you should upgrade using the new CloudVPS backup installer, there are some requirements that need to be met:
Supported versions for upgrade: -‐ XLS Backup version 1.4 -‐ XLS Backup version 1.5 -‐ XLS Backup version 1.6 Unsupported versions: -‐ XLS Backup version 1.3 -‐ XLS Backup version 1.2 -‐ XLS Backup version 1.1
-‐ The upgraded version of the XLS Backupscript where the configuration options are in the backupscript itself.
-‐ The initial release of the XLS Backupscript.
Installation instructions for the unsupported versions:
Remove any old backup files, mostly the following command is enough: rm /usr/local/bin/xlsbackup
Also remove the cronjob with the following command: crontab –e
When done, please refer to page 5 and follow the installation instructions.
Upgrade instructions for supported versions:
First we need to download and run the tool in order to upgrade the backupscript, issue the following commands:
wget –O cloudvps-backup-installer
http://download.cloudvps.com/pub/files/scripts/backup/cloudvps-backup-installer.txt
chmod +x cloudvps-backup-installer ./cloudvps-backup-installer
Please select “Update backupscript” from the menu. The installer will first check if all required software is present and installs it where necessary.
If all necessary software is present the script will ask you if it should check for updates, please select “Yes”. When the script found the update please let the script upgrade the backupscript by selecting “Yes”.
Clear old backup logfiles
In order to use the clear function you need to have the backupscript installed, please refer to page 5 or 7 for the installation steps.
The backupscript produces logfiles every time the backup starts. This log contains information about the files that where transferred and/or log errors during the backup session.
These logfiles can take up a good amount of space (certainly when running for months) and can be cleared automatically to gain extra space.
Should you wish to backup these logfiles first, the logs reside in /var/log/backups/
To clear the logfiles, please run the installer and select option 8, you will be presented with the following question:
In this example it will delete 20 logfiles and clear up 9.7 Mb of space.
Select “Yes” to start the removal process and should be finished within a couple of seconds or select “No” if you don’t want to clear the old logs.
Testing your configuration
In order to use the test suite you need to have the backupscript installed, please refer to page 5 or 7 for the installation steps.
The test suite is a handy tool to check if all configured backup options are working as supposed.
The test consists of:
-‐ Checking SSH connectivity with the backupserver using the SSH key supplied in the configfile
-‐ Checking the MySQL dump functionality (if MySQL dumps are enabled) -‐ Check to see if the retention settings will fit the backup account (only for
CloudVPS and former XLS Hosting backupservers)
Running the test will result in the window shown below:
In this case the SSH connection was not successfully established with the remote server and quota support is not available (own machine) and MySQL dumps are not enabled, therefore has not been tested.
Based on the error you may be able to correct the problem better, because you can see clearly why it fails to run.
Running the backup manually
Should you wish to run the backup manually you can do so via 2 ways:
-‐ Run the backup installer and select option 11.
-‐ Execute the following command via the commandline: /usr/local/bin/cloudvpsbackup
The output is exactly the same as you receive via email and should only be used if you really need to run the backup an extra round.
Recovering data from backup
In order to use the recovery suite you need to have the backupscript installed, please refer to page 5 or 7 for the installation steps.
The most important function of having backups is being able to restore the data available on the backupserver in case of emergencies.
The installer has a simple restore option built-‐in which is able to restore files, folders and MySQL database dumps.
To start the recovery suite, start the backup installer and select option 10.
The installer will ask you if you want to continue and download the restorescript (will be automatically started after download), select “Yes” to continue.
The script will start with a greeter and after selecting “OK” will return the following menu:
Note:
Depending on the configuration options the menu can show different options. If you have MySQL dumps disabled, this option will not be visible.
We will explain the steps you need to undertake in recovering your data, this will not be a thorough explanation, because the dialogs presented are clear and understandable.
Recovering files or folders:
1. Select option 1 on the main menu.
4. Enter the absolute (full path) to the file or folder you wish to restore on your machine and agree to the restoration process.
The actual restore process may take a long while depending on the amount of files in the folder or the size of the file you wish to restore, don’t interrupt the script during this step!
5. When the restoration process is finished, you’ll be shown a window with the files and/or folders that were restored.
Recovering MySQL databases:
1. Select option 2 on the main menu.
2. Select the pool you want to recover from a.
3. Select the day (in case of the daily pool) or enter the month/week number (in case of week of monthly pool) a.
4. Enter the source (original) database. 5. Enter the target (destination) database b.
If the source and target database are the same, the script will warn you that this will delete the original database on the machine and restore it from the backup, see note b for more details.
6. Check your entered details in the confirmation window and select “Yes” to start the restoration process.
The actual restore process may take a long while depending on the size of the database you wish to restore, don’t interrupt the script during this step! 7. When the restoration process is finished, you’ll be shown a window
confirming a successful restore.
Note A:
The pools available to you are pulled from the backup configuration file. If you don’t have any extra weekly and/or monthly retention set up, these pools will not be available to you. Also note that you can only recover data from the pools that are already filled with data. If, for example, you have installed the script one week ago and set up 5 extra weeks of retention, you can only use the first weekly retention pool, because the other weeks have not passed yet. This also applies to the monthly backup.
Note B:
The source and target database may be the same, but may be only used to recover the source database on the machine, the local database will be dropped and the database pulled from the backup will be put into place with that same name. Should you wish to recover the database aside of the original one, please use a different name.
Help functionality
The installer has a built-‐in help function, which can provide information regarding your backups, installation and support.
The following topics are available: -‐ System requirements -‐ Common questions -‐ Common errors
-‐ Support for non CloudVPS machines -‐ Access types on the backupmachines
Should you have any questions, please check the available help provided in the installer to see if your topic is already covered. Should your topic not be available in the inline help, please send it to support@cloudvps.nl, so we can look into it.
Support
CloudVPS Customers
If you are looking for support regarding the installation, maintenance or recovering your data, check this manual and the available help in the installer first.
Should your question not be covered in these documents, please send an email to
support@cloudvps.nl regarding your issue. Also check page 22 for more information on filing issues/bugs to us.
Non CloudVPS Customers
We offer support for non CloudVPS customers, but is limited to the following: -‐ Installation issues caused by our software.
-‐ Any type of bugs found in the script (only applicable if used on a supported system, see the software requirements).
For these types you can send an email to support@cloudvps.nl explaining your issue, see page 22 for more information on filing issues/bugs to us.
What we do not support:
-‐ Installation support on non CloudVPS (backup)machines. -‐ Any misconfiguration errors caused by the user.
Filing bugs, issues and feature
requests
Bugs and issues
While we have spent a lot of time building and testing the installer and its tools, it’s always possible that some bugs or uncovered errors are still present in the code.
Should you have found an issue or bug on which you cannot use the script, please let us know by sending an email to support@cloudvps.nl with a good explanation about when the error occurs. Please make sure that you’ve checked the system requirements before sending in your report to make sure all dependencies are met.
When reporting errors, please supply the following items: -‐ The actual error
-‐ Your operating system
-‐ What type of controlpanel you use (if any) -‐ Version of the backupscript
Note:
Please note that installation errors due to misconfiguration by the user are not bugs and should not be sent to us.
Feature requests
The tools can always be improved by expanding its usability and we always encourage people to send in their suggestions and tips. Please send them to
support@cloudvps.nl and we will put your suggestion on the wishlist.
Glossary
Below is a list of common used terms and their explanation.
Retention
Retention is simply defined as how long the backupserver will keep your data. In the backupscript you have at least a minimum of 1 whole week and with options to enable extra weekly and monthly retention for a maximum of 52 weeks and/or 12 months.
Incremental / Differential backup
The incremental style repository aims to make it more feasible to store backups from more points in time by organizing the data into increments of change between points in time. This eliminates the need to store duplicate copies of unchanged data. This starts out with a full backup (of all files) and after that, any number of incremental or differential backups are made for the current week and/or extra retention that is given.
SSH (public) key
SSH keys serve as a means of identifying yourself to an SSH server using public-‐ key cryptography and challenge-‐response authentication. One immediate
advantange this method has over traditional password authentication is that you can be authenticated by the server without ever having to send your password over the network. Anyone eavesdropping on your connection will not be able to intercept and crack your password because it is never actually transmitted. Additionally, Using SSH keys for authentication virtually eliminates the risk posed by brute-‐force password attacks by drastically reducing the chances of the attacker correctly guessing the proper credentials.
Crontab / cronjob
Cron is a powerful job scheduler for GNU/Linux and many other operating systems. It automates recurring tasks by executing commands at a given time. It has a wide range of potential applications; most simple recurring tasks, from
Disclaimer
The scripts are provided as is and we cannot be held responsible for any data loss caused by improper usage of the scripts or misconfiguration. You use these tools at your own risk!