Home data backup recipe

Ok, I’ve finally decided to get off my butt and do something about making backups of all the precious family data. Up until now it has just been waiting to fall into a digital black hole.\r\n\r\n### Ingredients\r\n* one linux server\r\n* enough hard disk space to make backups\r\n* family PCs running Windows that have precious data on them\r\n* a home network\r\n* General information about using snapshot/rsync backup method\r\n* snapback2 backup software\r\n\r\nFrom here on, I’ll suppose that the server, windows PCs and network are already installed.\r\n\r\nTo get a working backup system, do the following\r\n\r\n* Install Config::ApacheFormat from CPAN\r\n\r\n perl -MCPAN -e shell\r\n cpan> install Config::ApacheFormat\r\n* Install snapback2\r\n* Create /etc/snapback2.conf containing something like this with a Directory directive for each PC\r\n\r\n Hourlies 4\r\n Dailies 7\r\n Weeklies 4\r\n Monthlies 12\r\n #AutoTime Yes\r\n AutoTime No\r\n Compress No\r\n Debug 4\r\n\r\n #AdminEmail backups@yourdomain.org\r\n AdminEmail you@yourdomain\r\n AlwaysEmail Yes\r\n\r\n LogFile /var/log/snapback.log\r\n ChargeFile /var/log/snapback.charges\r\n\r\n Exclude core.\r\n\r\n SnapbackRoot /etc/snapback\r\n\r\n #DestinationList /mnt/backup1 /mnt/backup2\r\n DestinationList /root/snapshot\r\n\r\n RsyncShell none\r\n Directory /mnt/FranksDocs/\r\n Directory /mnt/JonsDocs/\r\n Directory /home/share/\r\n\r\n Run snapback2 from cron every hour\r\n\r\n 0 * * * * /usr/bin/snapback2\r\n* Configure PCs to share documents read only\r\n* Use automount and Samba to access the documents on the PC hard disks\r\n * Put the following into /etc/auto.master\r\n\r\n /mnt file:/etc/auto.mnt\r\n * For each PC add something like this into /etc/auto.mnt\r\n\r\n + FranksDocs -fstype=smbfs,username=guest,password=,ro,fmask=755,dmask=755 ://192.168.0.4/FranksDocs\r\n * make sure automount is started at boot time (symbolic link in /etc/rc5.d)\r\n * Export backups locally read-only through NFS (/etc/exports)\r\n * /root/snapshot/localhost/mnt/FranksDocs 127.0.0.1(secure,ro,no_root_squash)\r\n execute exportfs -a\r\n * Mount read-only file system accessible to users (/etc/fstab)\r\n * 127.0.0.1:/root/snapshot/localhost/mnt/FranksDocs /snapshot/FranksDocs nfs ro,addr=127.0.0.1 0 0\r\n o create mount point /snapshot/FranksDocs\r\n * Export using Samba so users can access their backups\r\n * Create /etc/samba/smb.conf\r\n\r\n + # Global Parameters\r\n [global]\r\n workgroup = YOURWORKGROUP\r\n security = SHARE\r\n server string =\r\n #printing = CUPS\r\n #printcap name = CUPS\r\n disable spoolss = Yes\r\n #show add printer wizard = No\r\n wins support = yes\r\n + [SaveFrank]\r\n comment = Recover old versions of Frank’s files here\r\n path = /snapshot/FranksDocs\r\n read only = Yes\r\n force user = share\r\n force group = family\r\n guest ok = Yes\r\n nt acl support = No\r\n That’s it you’re done

Written on December 24, 2004