Backups: Difference between revisions

From GigaTux Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


  rdiff-backup -v3 --restore-as-of 2W [email protected]::/mnt/gigatux/backup-lvm-new/backup-xen-node01001-14/home/dreamful .
  rdiff-backup -v3 --restore-as-of 2W [email protected]::/mnt/gigatux/backup-lvm-new/backup-xen-node01001-14/home/dreamful .
==cPanel Backups==
We do not do standard cPanel backups, but we do backup the entire VPS that each cPanel instance runs on. Thus, you will need to perform backups using the full pathname. For instance, if you wanted to restore the sites for username ''thisuser'' on cpanel01001, commands similar to the below can be used:
rdiff-backup -v3 --restore-as-of 2W [email protected]::/mnt/gigatux/backup-lvm-new/backup-xen-node01001-14/home/thisuser .
rdiff-backup -v3 --restore-as-of 2W [email protected]::/mnt/gigatux/backup-lvm-new/backup-xen-node01001-14ssd/mysql/thisuser* .
The first command restores the cPanel files and the second restores the MySQL databases for this user. Be sure to restore each set of files to the correct location.


=Removing=
=Removing=

Revision as of 10:46, 21 July 2012

If you need to restore a backup, look at how backups are done on each VPS (script /usr/local/sbin/gigatux-backup.sh) and use the rdiff-backup --restore functionality to restore to an appropriate location. If a full VPS restore is required, create a new logical volume to do this (lvcreate) and change the relevant /etc/xen/xenXX file to point to this to test it out.

For example, something like the following will attempt to restore a directory from two weeks ago:

rdiff-backup -v3 --restore-as-of 2W [email protected]::/mnt/gigatux/backup-lvm-new/backup-xen-node01001-14/home/dreamful .

cPanel Backups

We do not do standard cPanel backups, but we do backup the entire VPS that each cPanel instance runs on. Thus, you will need to perform backups using the full pathname. For instance, if you wanted to restore the sites for username thisuser on cpanel01001, commands similar to the below can be used:

rdiff-backup -v3 --restore-as-of 2W [email protected]::/mnt/gigatux/backup-lvm-new/backup-xen-node01001-14/home/thisuser .
rdiff-backup -v3 --restore-as-of 2W [email protected]::/mnt/gigatux/backup-lvm-new/backup-xen-node01001-14ssd/mysql/thisuser* .

The first command restores the cPanel files and the second restores the MySQL databases for this user. Be sure to restore each set of files to the correct location.

Removing

If a customer cancels their service which has a backup associated with it, we need to delete the backup. Use a command like the below to do this:

rdiff-backup --force -v3 --remove-older-than 0D [email protected]::/mnt/gigatux/backup-lvm-new/backup-xen-node00001-49