backup |
These notes are my personal online notebook of useful commands and "how-to's". You are welcome to make use of them if you find them helpful. They obviously don't come with any warranty! Click on one of the category tags above for the notes in any category. |
|||
tar -cvjSf filename.tar.bz2 foldername |
|||
See user manual here: www.gnu.org/…escue_manual.html
Example script:
# first pass to copy the good sectors and make a log file of the bad ddrescue -n /dev/sdc /dev/sdb logfile # second pass keeps retrying the bad sectors ddrescue -dr3 /dev/sdc /dev/sdb logfile # have a look at what we have and do some validation fdisk /dev/sdb e2fsck -v -f /dev/sdb1 e2fsck -v -f /dev/sdb2 # It might be necessary to manually copy partition |
|||
We have used btsync very successfully for the last couple of years, but their pricing model would make the way we use it extremely expensive. |
|||
Some resources for setting up backups: Comparisons
Duplicity
Rsync
|
|||
The goal is to sync a common directory structure over multiple sites. Permissions on server
useradd -g office -d /home/common -c "btsync service" -m btsync
chgrp -R office /home/common chmod g+s /home/common #just to top directory (assume no sub-directories) chmod -R g+w /home/common
First time setup |
|||
wget http://pkgs.repoforge.org/rdiff-backup/rdiff-backup-1.2.8-4.el6.rf.x86_64.rpm rpm -ivh rdiff-backup*.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm #for 7 yum-config-manager --disable epel #disable since we on |
|||
dd if=/dev/VolGroup00/LogVol00 of=/dev/vg1000/LogVol00 dd if=/dev/VolGroup00/jessica | bzip2 -1 > /data/jessica.dd.bz #20Gb |
|||
Ubuntu Hardy and Intrepid come with older versions or rdiff-backup, but the current stable version (1.2.2) is in the Jaunty repositories. To install it: |
|||
First it is necessary to create a backup user on the database which has (only) read access to everything. This is because its password will be embedded in the backup script which reduces security. This can be done with: |
|||
