This is a simple way to backup and restore your Ubuntu desktop with sbackup.
Go to Applications -> Ubuntu Software Center -> Search: sbackup
Install both selected packages, Simple Backup-Configuration and Simple Backup-Restoration
Then go to Applications and click Simple Backup-Configuration. In the General tab choose the settings that best fit your needs.
Do a full Backup at least once every X amount of days, under Include choose the directories such as /home/username that you would like to backup.
Under the Destination tab choose either the default directory /home/username/.local/share/sbackup/backups or a remote directory with SSH.
Then click save configuration, then “Make Backup Now”
To restore an existing backup, choose Applications -> Simple Backup-Restoration
choose the path of the directory that it was originally backed up too… and then the date from which you would like it to go back too and hit apply.
It’s just that simple, no shell scripting required.