Backup Files Quickly and Easily

This documentations shows how to backup files, in our case the home directory, to a mounted drive. We will cover this topic with the applications Back in Time, that can be used graphically and on the command line and later rsync, a command line tool.

Back in Time and rsync are pre-installed on Trisquel GNU/Linux. For instructions on how to install them, see the Documentation about Installing, Updating and Removing Software.

Using Back in Time

How to initiate a back up of /home on an external drive

  • In the Main Menu go to Other→Back in Time
  • A prompt should pop up asking you if you want to restore, click No

https://trisquel.info/files/back-in-time-initiate-backup-1.png

A window titled Settings should pop up

  • Here, select the drive where you want to back up, click on the folder icon in Where to save snapshots and select Computer > / > media > user > <name of the drive> (make sure the drive is mounted)

https://trisquel.info/files/back-in-time-initiate-backup-2.png

  • To select /home/<user name> folder to backup, in Settings go to the tab titled Include, click Add folder and select the folder <user name>

https://trisquel.info/files/back-in-time-initiate-backup-3.png

Now, /home/<user name> should be listed in Include files and folders

  • Click OK

https://trisquel.info/files/back-in-time-initiate-backup-4.png

A window titled Back in Time should pop up

  • Click the Take a snapshot button to take the first snapshot.

https://trisquel.info/files/back-in-time-initiate-backup-5.png

After the snapshot is taken, it will be listed in the left bar. That's all! Your snapshot is done!

https://trisquel.info/files/back-in-time-initiate-backup-6_0.png

How to restore from backup

  • In the Main Menu go to Other→Back in Time (root)
  • A prompt should pop up asking you if you want to restore, click Yes

https://trisquel.info/files/back-in-time-restore-backup-1.png

  • A prompt should pop up asking you for user password. Enter the root password here.

A window titled Restore Settings (as superuser) should pop up

  • Navigate to the snapshot you want to restore and select it (The path to the snapshot should show up in green at the bottom.)
  • Click Restore

https://trisquel.info/files/back-in-time-restore-backup-2.png

  • Click OK

https://trisquel.info/files/back-in-time-restore-backup-3.png

A window titled Back in Time (as superuser) should pop up

  • Select the right snapshot
  • Then, select the folder you want to restore

https://trisquel.info/files/back-in-time-restore-backup-4.png

  • Click Restore

https://trisquel.info/files/back-in-time-restore-backup-5.png

  • A window titled Question (as superuser) should pop up
  • Click Yes

https://trisquel.info/files/back-in-time-restore-backup-6.png

  • At last, a log will pop up, that you can close by clicking Close

You're done!

Using Back in Time from the command line

To back up:

 backintime backup
To list options run:
 backintime -h

Comment

This is the simplest way to backup and restore. Please take a look at other options e.g. Mode, Schedule, et cetera.

Using rsync

To make a backup of your home directory using rsync you can use the following example:

First, create a directory on a mounted drive. For example, run the following command in a terminal, where /media/trisquel/backup/home/$USER/ is the target we want to use later:

 mkdir -p /media/trisquel/backup/home/$USER/
Second, run rsync, where /home/$USER/ is the source and /media/trisquel/backup/home/$USER/ is the target. Make sure not to forget the / at the end of them, that will mark them as a directory. The following command will exclude the .cache directory, because in most cases it is not needed.
 rsync -av --exclude=.cache /home/$USER/ /media/trisquel/backup/home/$USER/
To restore a backup you can use rsync again.
 rsync -av /media/trisquel/backup/home/$USER/ /home/$USER/
Adapt this examples to your needs!

Notes

For your security, you should only store your data on a device you control, e.g. an external drive.

AttachmentSize
back-in-time-initiate-backup-1.png19.57 KB
back-in-time-initiate-backup-2.png44.15 KB
back-in-time-initiate-backup-3.png34.48 KB
back-in-time-initiate-backup-4.png37.25 KB
back-in-time-initiate-backup-5.png92.23 KB
back-in-time-initiate-backup-6.png53.62 KB
back-in-time-restore-backup-1.png21.21 KB
back-in-time-restore-backup-2.png61.54 KB
back-in-time-restore-backup-3.png45.78 KB
back-in-time-restore-backup-4.png86.11 KB
back-in-time-restore-backup-5.png85.02 KB

Revisions

02/13/2010 - 07:00
AndrewT
04/29/2011 - 01:43
SirGrant
08/13/2013 - 19:21
lloydsmart
04/14/2014 - 07:13
alguien
10/20/2019 - 07:42
lap4fsf
08/24/2022 - 19:10
Staircase
12/10/2023 - 20:11
knife