Thursday, February 4, 2010

Backup and restore using SimpleBackup

I am using SimpleBackup for backing up my home directory. Download the utility and extract into some directory. Then do the following -

Backup
  • First, cd to that the SimpleBackup directory.
  • Run simplebackupconfig. You get a dialog where you can configure some stuff - mainly, the directories to be backed up, and the directories to be excluded from backup, and the directory where the backup files (which will be in .tar.gz form) should be stored.
  • Change the script bkup at line if [ $intdayofwk = 1 -o ! -e "$timestampfile" -o $lastfullbkage -gt 7 ]; to e.g. if [ ! -e "$timestampfile" -o $lastfullbkage -gt 30 ]; to do incremental backup unless it has been 30 days since the last full backup.
Restore
  • Decide on the directory or file to restore. cd to /. Run tar -xzf bkupfile.tar.gz --anchored "home/gtholpadi/Desktop/Files/some/dir".
  • This will create the directories home, gtholpadi etc. till dir, and also the directories in dir, if they don't already exist.
  • If extracted files already exist, they are overwritten.
  • Other files are kept intact.
  • Replace dir with file to extract file.

Update: I have now moved to rsync.

No comments:

Post a Comment