10

What options do I have for backing up the content from a Rackspace Cloud Sites including files and databases? I know they have cron jobs, but I am not sure what options I have when it comes to that.

Here are some of the things the cron jobs they have support.

6 Answers 6

3

I use two scripts to back up my VPS (hosted on Linode, but the same should work on Rackspace).

First, for mysql backup, I use the automysqlbackup script. It takes care of dumping your databases, compressing them, and maintaining several daily/weekly/monthly copies of the backup files. It can also email you the compressed .sql dumps as well.

For general filesystem backup, I use duplicity - this can use a number of different storage backends (ftp, scp, nfs, etc), but I choose to use the Amazon S3 backend. Duplicity will do either full or incremental backups depending on your need. It will also handle compression of your backup files as well as encryption if you so desire.

1
  • 1
    With rackspace I do not have shell access. Dec 17, 2009 at 16:33
1

Rackspace doesn't allow SSH to their Cloud Sites so I don't think Duplicity will work unless you can convince them to install it.

We were looking for a solution as well, but ended up building a backup system which archives files and SQL dumps and transfers them to Rackspace Cloud Files, named and dated. The system handles cleaning up old backups (we keep a variety of daily/weekly/monthly backups) and works as a module on a dedicated Drupal install. The admin gives feedback on the status of each backup and populates a Google spreadsheet to give an overview. It can also work with any site outside of Rackspace, since it's using a PHP client to do all the work (upload one PHP script to the sites you want to back up, set it up on the admin UI, and the master site will take care of all the scheduling/authentication/etc...) We're using it internally but may release it as a module if there is any interest for it, so let me know.

1
0

The only way I know of is to create a cron job to backup your data and databases and have it ftp or whatever method you want to use for transmission of data. Here is a sample script.

#!/bin/sh
# System + MySQL backup script
# Full backup day - Sun (rest of the day do incremental backup)
# Copyright (c) 2005-2006 nixCraft 
# This script is licensed under GNU GPL version 2.0 or above
# Automatically generated by http://bash.cyberciti.biz/backup/wizard-ftp-script.php
# ---------------------------------------------------------------------
### System Setup ###
DIRS="/home /etc /var/www"
BACKUP=/tmp/backup.$$
NOW=$(date +"%d-%m-%Y")
INCFILE="/root/tar-inc-backup.dat"
DAY=$(date +"%a")
FULLBACKUP="Sun"
### MySQL Setup ###
MUSER="admin"
MPASS="mysqladminpassword"
MHOST="localhost"
MYSQL="$(which mysql)"
MYSQLDUMP="$(which mysqldump)"
GZIP="$(which gzip)"
### FTP server Setup ###
FTPD="/home/vivek/incremental"
FTPU="vivek"
FTPP="ftppassword"
FTPS="208.111.11.2"
NCFTP="$(which ncftpput)"
### Other stuff ###
EMAILID="[email protected]"
### Start Backup for file system ###
[ ! -d $BACKUP ] && mkdir -p $BACKUP || :
### See if we want to make a full backup ###
if [ "$DAY" == "$FULLBACKUP" ]; then
FTPD="/home/vivek/full"
FILE="fs-full-$NOW.tar.gz"
tar -zcvf $BACKUP/$FILE $DIRS
else
i=$(date +"%Hh%Mm%Ss")
FILE="fs-i-$NOW-$i.tar.gz"
tar -g $INCFILE -zcvf $BACKUP/$FILE $DIRS
fi
### Start MySQL Backup ###
# Get all databases name
DBS="$($MYSQL -u $MUSER -h $MHOST -p$MPASS -Bse 'show databases')"
for db in $DBS
do
FILE=$BACKUP/mysql-$db.$NOW-$(date +"%T").gz
$MYSQLDUMP -u $MUSER -h $MHOST -p$MPASS $db | $GZIP -9 > $FILE
done
### Dump backup using FTP ###
#Start FTP backup using ncftp
ncftp -u"$FTPU" -p"$FTPP" $FTPS<
mkdir $FTPD
mkdir $FTPD/$NOW
cd $FTPD/$NOW
lcd $BACKUP
mput *
quit
EOF
### Find out if ftp backup failed or not ###
if [ "$?" == "0" ]; then
rm -f $BACKUP/*
else
T=/tmp/backup.fail
echo "Date: $(date)">$T
echo "Hostname: $(hostname)" >>$T
echo "Backup failed" >>$T
mail -s "BACKUP FAILED" "$EMAILID" <$T
rm -f $T
fi
0
0

A Cron job running a script seems like a more "solid" solution to me. I am still in the process of getting away from my dependency on GUI's. D:

That being said, I use Cobian Backup to automatically backup all site files @ cloudsites via FTP on a nightly basis. It's a pretty good fire and forget solution that requires no scripting knowledge or Cron jobs, just make sure you test restore periodically.

More details here: http://www.iainlbc.com/2010/04/how-to-backup-rackspace-cloudsites-automatically-incrementally-using-free-software/

MySQL Administrator(EOL) handles the automated backups of our amazon RDS

0

very simple script for backup in rackscpace cloud files with duplicity

http://github.com/contenidosonline/cloud-files-backup

0

I tried http://www.zipitbackup.com/ . Its backup utility from rackspace. It works well.

Documentation says How it works:

->Runs on a per-site basis. The Zipit Backup Utility must be installed for each site you want to back up.

->The Zipit Backup Utility backs up all Cloud Sites files and databases to your Cloud Files account.

->Lists all available backups. Available backups can be managed via the Cloud Control Panel.

2
  • Zipitbackup spam. Oct 1, 2015 at 19:12
  • @DeerHunter, Please suggest alternatives than marking spam to others answers so that community can decide which answer is useful or not.
    – Dashrath
    Oct 8, 2015 at 7:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .