Backups on Xubuntu with SBackup

The earth is orbited by many satellites, and every year, many more are sent up into space. Considering the amount of satellites, there is an enormous risk that one of those artificials moons suddenly decides to take a stroll and crashes into your home. I think you’ll agree with me that this would be disastrous – all your precious data would be lost! Your holiday pictures, important documents for school/work and your music collection – all gone!

Of course, you have to protect yourself against catastrophic situations like the one described above (and against hard drive failures). If you’re anything like me, you have no backup solution set up, and though you want to set it up, you keep postponing really taking that step. Well, now is the time. In order to write this guide, I set it up for myself, so now it’s your turn while reading this guide. And let me tell you, once you free up those minutes to set it up, you’ll be glad you did. Even if you’re never going to need it, it feels a lot better knowing that you’re prepared for eventual bad luck.

You need a place to store your backups though. If you create a backup on the same drive as the original files, a hard drive failure will affect that backup just as much as the original files. For out method, the destination can either be another hard drive or a remote directory (through SSH or FTP). If you don’t know what any of these mean, then you probably do not have access to it. Unfortunately, this means that you will not be able to create a backup. If you do possess one of these, read on πŸ™‚ .

The destination I’ll be using is an internal hard drive that used to hold a secondary and lesser-known operating system. Its capacity is a mere 20 GB, so I’ll only be backing up my most important files. Of course, if you happen to have an external 160GB hard drive laying around, be sure to use it to the fullest.

Introducing… SBackup!

A quick search using Applications->System->Add/Remove... (with “All available applications” enabled in the top right-hand corner) for backup turns up a few backup solutions. The application we will be using, which also happens to be the most popular one, is Simple Backup, or SBackup. SBackup is a complete solution, able to automatically create backups at set intervals, keeping the backup size as low as possible. Listed are Simple Backup Config and Simple Backup Restore, which allow you to backup and restore your backup respectively.



Selecting one will also select the other because, obviously, we need to create backups in order to restore them.



With both selected, click Apply Changes and finish the installation as usual.

Once the installation has finished, you can find SBackup’s configuration utility under Applications->System->Simple Backup Config.



Setting it all up

By default, SBackup is set up to only perform backups when you tell it to. However, for maximum security, we want it to automatically create a new backup every so often, and now and then delete old backups in order to save space. To make sure the backups are created exactly the way you want it, select Use custom backup settings.

The first thing to do is selecting which files you want to be included in the backup. This can be done under the Include tab on top.



SBackup comes with a few useful defaults, however, considering the size of my backup drive, I decided to only backup the /home/ directory, which contains the documents and settings of every user on the system. Do include the defaults if you have enough room, though.

Next is deciding which files you do not want to be included in the backup, which can be done under the Exclude tab. You can use the preferences in this tab to exclude any files which you do not regard of enough value to justify the amount of space they’d consume in the backup.



The Exclude tab, in turn, contains four other tabs on the left-hand side.

The first one is the Paths tab, which allows you to exclude complete directories. I left it at the defaults since I had no specific directories I wanted to exclude, and I also felt no need to include the directories listed as excluded by default.

Moving on to the File types tab, though, there were certain files I could not afford to backup. A lot of multimedia files were already excluded, which was fine to me – I cannot afford to back up my (measly little) music collection. However, I often help testing new versions of Xubuntu. This involves downloading complete CD “images” (files that can be put on a CD) which can be up to 700 MB in size. The names of these images always end in .iso, and since there is no need for me to keep them that long, I clicked Add and opted to exclude files with the iso extension.





The Regex tab is not that interesting for this guide, since those who know what it does, are able to figure it out by themselves.

The Max size tab is very useful though, because it allows you to set a maximum size for files to be backed up, which comes in very handy in preventing your backup from growing too big.

We then move on to the Destination tab on top. This tab allows you to, as its name implies, set the destination for your backup. You can set up a remote directory at the bottom – I’ll be setting a custom local backup directory.



I located my external hard drive in the /media/ folder, by the name hda1. It is also listed in my left pane in Thunar (the file browser) as 20G Volume. In there, I created a new folder (/media/hda1/gay/, with gay being the name I gave my computer during installation, but feel free to use whatever you like) to hold my backups. Then I selected Other… in the drop-down menu and selected that folder.

Next up was configuring when the backup is to be ran in the Time tab.



Since I do not have that much space I opted for weekly backups, but of course, the best way to go would be daily. Since I do not leave my computer on 24/7 I cannot set it to create a backup in the middle of the night, so I opted for “simply”, which supposedly means “as soon as the computer is running, with the previous backup being made at least one week ago”.

The last tab, Purging, allows you to configure how long you want to keep old backups.



Mostly, you’ll want to select “Logarithmic”, being the most efficient and recommended method, but if you want to select an exact number of days to keep old backups, that’s possible to.

After finishing the configuration, click “Save” to, well, save your configuration.

Let’s back things up

Of course, I immediately wanted to make my first backup. For that, SBackup comes with the extremely handy “Backup Now!” button πŸ™‚

Clicking that popped up a window, saying: A backup run is initiated in the background. The process ID is: 7986.



Well, that’s it really – now you can close Simple Backup Config. The backup is being created, and the next one will be created after the period you selected ends. Opening the folder you selected as the destination (/media/hda1/gay/ in my case) will show you that a new directory has been created which will contain the backup.



If you take a look at a later time (once the backup has been completed), you will see that that directory has been filled with files containing information about the backup, and files.tgz which contains the backed-up files.



Restoring a backup

Restoring the backup is very easy, too. Open up Applications->System->Simple Backup Restore, from where you can select the location of your backups.



A drop-down menu “Available backups” provides you a list of all available backups. Selecting one of them will present you with a list of files included in that backup, clicking “Restore” will restore those files in their original location, “Restore As…” allows you to select a different location.

Conclusion

It was about time you created yourself a backup, and tell me: doesn’t it feel wonderful? Simple Backup is an excellent tool that, despite not being as good-looking as Apple’s Time Machine, definitely provides a complete solution for backing up your documents.

And by the way, with this being my first post of 2008, let me wish you all the best for the coming year. 2007 was an magnificent year for this blog, having survived into 2008 since its conception in 2007. There’s no complaining about the number of visitors, too: at the time of writing, with just 24 posts (this being the 25th), I’ve received a total of 116 798 views, with about 500 to 600 views a day recently. Furthermore, I believe it’s also been useful to a few people, which was the reason for starting this blog in the first place.
On the personal level, it also was a fantastic year. My mother’s ex, who was a massive burden to me, finally left (he lived here since I was about thirteen years old), enabling me to develop tremendously as a person, which I expect to continue in 2008. My writing style has also improved – another trend which I hope will continue in 2008.
All in all, let’s make 2008 another awesome year, and of course, if you got any further suggestions, be sure to make it known πŸ™‚ .

9 Responses to “Backups on Xubuntu with SBackup”


  1. 1 Derrick 28 January 2008 at 9:48 pm

    Hey, I like the blog. I just figured I’d let you know that I added it to my links at my blog, http://ubuntuisms.com . There needs to be more of these kind of things. Anyway, c-ya

    – Derrick

  2. 2 Tony 4 February 2008 at 2:30 pm

    HI again, Vincent!

    First of all, Happy New Year! Many fun charms and good health throughout 2008! :>

    Thanks for the good post, you seemed to space it out just when I needed it! I don’t know how you do it! ^_^

    And a funny directory name there! (Hehe.)

    Cheers
    Tony

  3. 3 N A T 29 November 2008 at 4:10 pm

    Nice tutorial. Why on earth would you call your backup folder “gay” though? XD

  4. 4 Joe 29 November 2008 at 11:53 pm

    Hi Vincent,
    very nice tutorial!!!
    A good balance between information, howto and entertainment. I read it sentence by sentence (very rare surfing the net).

    Love your blog

    Joe

  5. 5 Vincent 30 November 2008 at 3:29 pm

    @N A T – ha, that was the name of my computer at the time (I mostly give it a name that starts with the same letter as the version that’s installed on it – Hardy was “hoera”, for Gutsy it was “gay”, as in “happy” πŸ˜‰ ).

    @Joe – thanks for the compliments ^.^

  6. 6 Richfrog 31 May 2009 at 9:55 pm

    Wonderful informative site!

    One question. There are 3 user accounts on this xubuntu p.c. will the back up I just created back them all up or will the other users have to log into their accounts and back their stuff separately? I have administration with my account.

    Richfrog

    • 7 Vincent 31 May 2009 at 10:05 pm

      Hi Richfrog, that entirely depends on what folders you select under the Include tab. If you include /home/ like I did above, the documents and settings of each user account will be included in the backup πŸ™‚

  7. 8 Richfrog 1 June 2009 at 1:04 pm

    I did select “home.” Thanks!

  8. 9 horatio 6 June 2009 at 6:57 am

    Read about this in a Linux magazine. Trying it out. If it works 0.5 as good as the article says, I’m going to be extremely happy. Don’t stop on upgrades and development! Excellent job. πŸ™‚


Leave a comment




a

Most popular posts