Scheduled Backup -- Cloud Sites to Cloud Files
NOTE: This article is written for our Cloud Sites Cloud Control Panel. You can access this interface from the Cloud Control Panel by clicking your username in the upper-right of the control panel and selecting "Cloud Sites Control Panel".
This article provides a simple installer for setting up scheduled backups via a cron task. The installer will setup all the necessary files for backing up your site files and database. It will also setup the Cloud Files API for moving your backups to your Cloud Files storage.
If you want a web-based tool to manage manual and scheduled backups instead, the Zipit tool can offer that additional functionality.
- Cloud Sites has a 15 minute limit on anything run via cron task. If your site backup takes longer than the 15 minute limit your backups will not complete or may result in partial backups.
- Backups are limited to a total of 4gb.
- For Linux sites only.
- Download this file and save it to your local machine as "cron-backup-setup.php" without the quotes.
- Upload the cron-backup-setup.php file to the content folder of the site you want to backup.
- Open your web browser and navigate to http://yourdomain.com/cron-backup-setup.php to access the installer.
Note: Replace "http://yourdomain.com" with your actual domain name.
- Enter your database credentials. (Leave this section blank if your site does not have a database)
Note: Be sure to use the hostname and not the IP address for your database.
- Enter your Cloud Files username and API Key.
For more information regarding Cloud Files pricing visit:
- Click "Install"
Here is a screenshot of the Cron Backup Setup interface:
Once the installation is complete you will see one new directory that contains the Cloud Files API files and two files used to backup your site. These files will be found in the "root" of your site (ie. www.yoursite.com directory). Below is a list of the additions to your site.
- cron-backup-api (directory containing API files)
- cron-backup.php (main backup file)
- cron-backup-config.php (configuration file)
Now that you have the backup script and all necessary files installed you can setup your cron job to backup your site.
For more information on setting up a cron task in Cloud Sites please refer to the following article.
Here are the basics of what you will use for the cron task:
- Command Language: php
- Command to Run: cron-backup.php (You do not need to include any path information. Simply put cron-backup.php in this field)
Note: It is highly recommended that you choose the option to send the results via email. This will help ensure that you are aware if your backups fail for any reason.
Here is a screenshot of the the cron setup in the Cloud Control Panel:
That's it! You should now have scheduled backups setup for your Cloud Site. Your backups can be found within your Cloud Files section of the Cloud Control Panel.
The container for the backups will be named with the following syntax:
The backups will be named with the following syntax:
domain.com-backup-DATE.zip where DATE is the date that the backup was taken
By installing this backup script you agree that this feature is an Unsupported Service (as defined herein) and you also agree to the terms of the GPL License! See: GPL v3
If you use the tool described in this article, you agree that the tool is an “Unsupported Service”. Rackspace makes no representation or warranty whatsoever regarding any Unsupported Service, and you agree that Rackspace will not be liable to you for any loss or damage arising from the provision of the Unsupported Service. The Service Level Guaranties will not apply to the Unsupported Service, or any other aspect of your services that are adversely affected by the Unsupported Service. You acknowledge that Unsupported Services may not interoperate with Rackspace’s other services or other third party services you use.
© 2015 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
See license specifics and DISCLAIMER