Re: [Dar-support] Help with trying to backup home directory.
For full, incremental, compressed and encrypted backups or archives
Brought to you by:
edrusb
From: <dar...@ca...> - 2009-02-15 07:38:58
|
Hello Wayne :-) The list has given very good advice. Here is an outline /home backup to DVD using dar; you could enter these commands at the command prompt or turn them into a bash script. # Make backup file using dar sync ; sleep 2; sync ; sleep 2 dar --create /var/dar/home --fs-root /home \ --alter=atime --empty-dir --noconf --verbose \ --prune lost+found \ --prune '*/.local/share/Trash' --prune '*/.mozilla/firefox/*/Cache' \ --prune c/d/Archive --prune c/d/Audio --prune c/d/Pictographic \ --exclude WXPsystemdrive.vdi \ --gzip=5 --alter=no-case --exclude-compression '*.jpg' # Verify backup file against original files # (if /home is changing this may produce a lot of output; the solution is to use an LVM snapshot) dar --diff /var/dar/home --fs-root /home # Copy backup file to DVD umount /dev/scd0 growisofs -Z /dev/scd0 -speed=1 -iso-level 4 -r /var/dar/home.1.dar /usr/bin/dar_static # Verify backup file on DVD against original files mount /dev/scd0 /media/cdrom0 dar --diff /media/cdrom0/home --fs-root /home eject /dev/scd0 # Check that some (*.ods -- assumes you use OpenOffice Calc) files can be restored dar_static --extract /var/dar/home --fs-root /tmp/trash \ --alter=atime --noconf --verbose \ --alter=no-case --alter=mask \ --exclude '*' --include '*.ods' This is not a recipe for you; it is a set of clues. Each system and each user's requirements are different. My own backup script, based on the above skeleton, is now 6+ months in development and 1500+ lines long. As an example of the specificity and refinement from the above skeleton, the prunes have now grown to c/Archive c/d/Archive c/d/Audio c/Downloads c/d/Pictographic */.gqview/metadata */.gqview/thumbnails */.gvfs */.local/share/Trash */.macromedia/Flash_Player */.metacity /sessions */.mozilla/firefox/*/Cache */.nautilus/metafiles/file:* */.nautilus/saved-session* */.opera/cache4 */.opera/opcache */.thumbnails */.VirtualBox/Machines/*/Snapshots Best Charles |