The perfect Backup for a Ubuntu Workstation in 10 Minutes
Nobody wants to do backups - but everyone wants to have a backup handy after something went wrong.
Therefore the best backup solution is one that doesn't require any user interaction.
The following does NOT make a system backup ! But what it does without any user interaction about once a day is to backup my data.
The following has been made on a machine running Ubuntu 8.04.
- apt-get install backuppc
this installs BackupPC 3.0 and a lot of other dependent packages. In case Apache isn't installed you'll get asked which version you prefer. My Answer was "Apache 2".
- Now BackupPCshould be available under http://localhost/backuppc
The password that's required to login has been displayed during the installation process. To change the password open a terminal and type
sudo htpasswd /etc/backuppc/htpasswd backuppc
- By default BackupPC does backups of /etc
Select the host "localhost" and goto "edit config" and section "Xfer"
Add as many "TarShareNames" as you like. But at least /home
- To give backuppc full access privileges we need to run the backup process as root. Change the "TarClientCmd" to
/usr/bin/env LC_ALL=C /usr/bin/sudo $tarPath -c -v -f - -C $shareName --totals
Save the changes
- To allow backuppc to use the tar command as root edit the file /etc/sudoers
sudo nano /etc/sudoers
and add the line
backuppc ALL=NOPASSWD: /bin/tar
- Now you can start your first backup manually to see that everything works. Subsequent backups will be done automatically once the last backup is older than 0.97 days.
Having a backup for the last 7 days is nice but doesn't help anything on a defect harddisk. So please store the backup on a additional harddisk ! BackupPC writes it's data to /var/lib/backuppc where I've mounted my backup harddisk.