Size: 10739
Comment: Brings precision to the "Simply" option for time settings
|
Size: 10739
Comment: References don't need to be seen, commented. Install standardized.
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
To install sbackup, you need to install the '''sbackup''' package from the '''Universe Repository'''. You can use [[SynapticHowto|Synaptic]], or install from terminal with [[AptGet/Howto|apt-get]]: {{{ sudo apt-get install sbackup }}} or just [[apt:sbackup|click here]] |
To install sbackup ensure '''Universe''' section of the Ubuntu repositories is enabled in your [[Repositories/Ubuntu|Software Sources]]. Then [[InstallingSoftware#installing-a-package|install the following package]]: '''''[[apt:sbackup|sbackup]]'''''. |
Line 83: | Line 81: |
Will make the backup when the computer is found available for this. "Precisely" would not make a backup if your computer is not up at the precise time, it would wait for the next scheduled time. | Will make the backup when the computer is found available after the desired time has passed. "Precisely" would not make a backup if your computer is not up at the precise time, it would wait for the next scheduled time. |
Line 85: | Line 83: |
Ref. : [[https://bugs.launchpad.net/ubuntu/+source/sbackup/+bug/126280|Oumar Aziz OUATTARA]] | ##[[https://bugs.launchpad.net/ubuntu/+source/sbackup/+bug/126280|Oumar Aziz OUATTARA]] |
This guide is part of the BackupYourSystem Page. It is separate for the sake of organization.
Introduction
As discussed previously in this article's parent introduction, data can be lost in innumerable ways. In order to stave off such loss, it's important to have a good backup strategy. Simple Backup Suite (sbackup hereafter) can be part of such an effort.
Sbackup is a powerful GUI backup program designed for desktop use, with a full set of features. It can backup any subset of files and directories, while obeying exclusion rules and limits on individual file sizes backed up. Backups may be saved to any local and remote directories that are supported by gnome-vfs.
As noted previously, sbackup uses compressed archives so it is not the best backup solution if you are primarily backing up large amounts of multimedia. These data types are already compressed during encoding. Making archives including such files will spend lots of time compressing these files with gzip with little to no space being saved.
Installation
To install sbackup ensure Universe section of the Ubuntu repositories is enabled in your Software Sources. Then install the following package: sbackup.
Backing Up Your Data
Once you have completed the installation you can access sbackup using System -> Administration —> Simple Backup Config, as follows.
The next screen will ask for your user password. Enter it and click ok.
Once it opens the sbackup application you can see the following screen where you can configure your backup settings. The first tab is General. In this example I am choosing Use custom backup settings.
Sbackup can be operated in 3 different modes
Recommended Backup
If you are new Ubuntu user or are not sure what you should backup. This will perform a daily backup of your /home, as well as system data held in /etc, /usr/local and /var. This will deliberately exclude any files over 100MB as well as common multimedia file types. By default this backup will be stored in /var/backup.
Custom Backup
This selection allows you to customize a profile and modify all options such as the include and exclusion rules, the scheduling time and where the backup will be made. The backup will proceed according to the settings on the pages other than General.
Manual Backup
If you want to manually control when the backups are performed choose this option. To start the operation click Backup Now! button at the bottom of the window. The backup will the proceed according to the settings on the other backup properties tabs. With this option you will be able to specify where to save the backup file.
From this point onward, it will be assumed that you have selected either Use custom backup or manual backups only. If you chose recommended backup, the settings on the following pages will have no effect.
Next, click on the Include tab. Here you can include any file or directory you want to backup.
If you click on the Add File button you should see the following screen where you can select files for inclusion.
If you click on the Add Directory button you should see the following screen where you can select a directory for backup.
The next tab is Exclude. Here you can exclude files and folders you do not want to backup according to specified rules. These rules can be established based on file location, file type, regular expression or the size of individual files.
The next tab is Destination. By default the archive will be created in /var/backup If you want to change the backup location you can select Use custom local backup directory and enter the location. To backup over the network, use the remote directory option and fill in the parameters. A more complete explanation of network backup can be found further in this article.
Now select the Time tab. Here you can schedule when you want to run your backup.
Available options for backups are shown in the following screen: never, hourly, daily, weekly, monthly, and custom options. The first five are straightforward, while the last allows for the creation of a cron definition (for advanced users).
In later versions, to the right of the drop down you'll find two options simply and precisely at are listed.
Simply
Will make the backup when the computer is found available after the desired time has passed. "Precisely" would not make a backup if your computer is not up at the precise time, it would wait for the next scheduled time.
Precisely
Will allow you to choose a specific date to perform the backup, say perhaps 6:15 AM daily.
Also important to note is the Do a full backup at least once every line. Sbackup does not create a new backup file each time it runs, instead it creates an incremental backup. This means that it updates the last backup with files which have been modified or created. Any files that have not been modified since the last backup are unchanged. By default in this screen, it is set to create a new full archive every 21 days. Set as desired, the more often the more space will be used.
The next tab is Purging. Here you can set how old archives should be handled after a certain time. The options are self explanatory.
Once all the options have been set as desired, push the Save button at the bottom to preserve your settings. You must save before performing a backup manual or scheduled or else your new settings won't take effect. Now if you want to make a backup just click on Backup Now! or wait for it to be performed on schedule if set. After starting the backup, the following confirmation will be displayed listing the background process ID.
Restore Your Data
If you want to restore backups or any files or folders go to System —> Administration —> Simple Backup Restore, as shown in the following screen.
Once it opens you should see the following screen. Here you can select the restore source folder and available backups from drop-down menu. Choose the files and folders you want to restore and click on the Restore button.
In this example, I have chosen to restore a single .iso file. After selection, simply push the Restore button and confirm your action when prompted. The file will then be restored to its original location. If you want to restore it to a different location select the Restore As... option.
Note: By default, restored files and directories are owned by root. This is because sbackup runs with root privileges. To change the permissions of files or folders you should own, either use chmod from a terminal or just right click and select properties of the file or folder. For additional information see FilePermissions.
Backup Destination on Remote Machine
One more nice feature of sbackup is that you can store your backup on a remote machine, either using SSH or FTP. For this go to System —> Administration —> Simple Backup Config. Under the Destination tab, you can select to Use a remote Directory. In the box, type ssh:// or ftp:// followed by the username:password, then @, then the remote host to connect to and the remote directory. Test button can be used to ensure the host is reachable.
If you do not want to expose your password in the clear you can use ssh keys:
# switch to root sudo su - # create a key set without a passphrase ssh-keygen # copy the public key to the backup server ssh-copy-id backup-user@backup-server/path/to/backups/machine-id/ # test that the connection will work without a password ssh backup-user@backup-server # make sure that the backup user can in fact write to the backup directory touch /path/to/backups/machine-id/test.txt rm /path/to/backups/machine-id/test.txt
Sbackup from the Command Line
Configuration
If you want to configure sbackup from a terminal you need to edit the /etc/sbackup.conf file. The following command for example will do:
sudo nano /etc/sbackup.conf
Restore Backup from the Command Line
To restore a particular backup from a terminal, use a command along the following lines.
sudo srestore.py /var/backup/2006-11-18_03 /home/myuser /home/myuser/old
In this example, srestore.py will use the backup /var/backup/2006-11-18_03 and restore the backup of the the directory /home/myuser to the current directory /home/myuser/old. Your command will of course need to be tailored to your needs.
Automatically Backup at Shutdown
In case you want to shutdown your workstation when you're done and not have to backup manually every now-and-then, you might find it useful to have simple-backup being run every time you log off. To enable this, you need to do only a few things:
Save this page sbackupd to /etc/initd/
Set file ownership to root:root and file permissions to: rwx-r-xr-x. See FilePermissions for help.
Execute the following from a terminal:
sudo update-rc.d sbackupd start 00 0 1 6 .
This will run the downloaded script every time Ubuntu comes into single-user-mode, shutdown or reboot. Since the script will only run sbackupd, this effectively gives you a backup every time you shutdown or reboot your machine.
I find it useful to use both a schedule and this 'at-shutdown' script because i get a backup at least once a day, and i needn't care about keeping my machine powered on.
This scheduled backup at shutdown can be removed with the following command:
sudo update-rc.d -f sbackupd remove
CategoryBackupRecovery CategoryInstallation CategoryInstallation