Timeshift system backups

Jarret B

Well-Known Member
Staff member
Joined
May 22, 2017
Messages
340
Reaction score
367
Credits
11,754
On June 29th, 2018 Linux Mint 19 was released. Release 19 is code-named ‘Tara’ and has Long-Term Support (LTS) until 2023 and it uses the Ubuntu 18.04 package base. The main addition to Linux Mint 19 is the program Timeshift.
This article will cover the use of Timeshift.

Features

Timeshift allows a user to create a snapshot of their system. When any updates are applied the Timeshift program can be used to “rollback” the changes if they should cause problems with the system. The function is like the System Restore feature in Windows or the Time Machine program in Mac OS.
Basically, a snapshot is made of the system (a full backup). When other snapshots are made, they are the differences made since the previous snapshots. The first snapshot will be the size of the disk space used on the drive (minus any folders not included in the snapshot).
Let’s take a minor little laptop I use which has Lubuntu 18.04 and a 160 GB hard disk. Lubuntu’s system files and my files only take up about 12 GB. My initial snapshot will be 12 GB and every snapshot after will be the sum of the files which have changed since the last snapshot.

Installation

You do not need Linux Mint 19 to use Timeshift. Timeshift can be placed on most distros. To install Timeshift on Ubuntu based systems, use the following commands:

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift


To uninstall Timeshift you use the following command after you delete all of the snapshots you have saved:

sudo apt-get remove timeshift

NOTE: Snapshots will not be removed by the uninstall command.

Once you have Timeshift installed, run it to start the initial setup wizard.

Setup Wizard

Once Timeshift starts the first time a wizard will guide you through the setup. These settings can be changed later if needed.
The first screen, as shown in Figure 1, allows you to specify whether to use RSYNC or BTRFS for the snapshot.

Figure 01.jpg

FIGURE 1

RSYNC is a Linux command which allows for the backup of files with their metadata such as Timestamps included. BTRFS can be used, but the BTRFS tools must be installed and you can only save the snapshot to the system folder (not an external device). Click ‘Next’ to continue with the wizard.

NOTE: To install the BTRFS tools, use the command: ‘sudo apt-get install btrfs-tools’.

The next screen will detect the system size on the disk (Figure 2) then display the devices to which the backup can be stored as shown in Figure 3. Here, you will see that the used spaced is about 12 GB. Select the device to which you want to place the backup snapshot files and click ‘Next’.

Figure 02.jpg

FIGURE 2

Figure 03.jpg

FIGURE 3

The next setup screen allows you to choose when a snapshot is made and how many to keep (Figure 4).

Figure 04.jpg

FIGURE 4


You can specify to perform a snapshot Monthly, Weekly, Daily, Hourly and at every Boot. You can also specify how many of the snapshots to store before deleting. Older snapshots are deleted first.

NOTE: Boot snapshots will delay the booting process until the snapshot is completed.

The options can be left unchecked so you can perform the snapshot manually. Click ‘Next’ to continue.
The next screen, Figure 5, allows you to specify to include User Home folders in the snapshot. Including these can be useful for performing a complete restore of a system. Click ‘Next’ when you have made your selections.

Figure 05.jpg

FIGURE 5


The final screen of the Setup Wizard shows some information about your choices as well other suggestions that can be helpful as shown in Figure 6. click ‘Finish’ when you are done.

Figure 06.jpg

FIGURE 6

Creating a Snapshot

The main window of Timeshift is shown in Figure 7. No snapshots have been made yet and there are 27.8 GB of space available on my selected drive for snapshots. To create a snapshot, select the ‘Create’ button at the top-left of the window. A snapshot process will start as shown in Figure 8.

Figure 07.jpg

FIGURE 7

Figure 08.jpg

FIGURE 8

Keep in mind that the time required to finish the snapshot will depend on the amount of space used, the speed of the system performing the snapshot, the speed of the device where the snapshot will be stored, etc.

NOTE: My little laptop is only backing up 12 GB, but the system has an Intel Atom processor and I am saving the snapshot to an USB Stick.

After the snapshot is created, Figure 9, you can see the snapshot listed. To see the backed up files, you can right-click on the snapshot and select ‘Browse Files’.

Figure 09.jpg

FIGURE 9

After performing the snapshot, I will use the System Updater to perform an update of the Ubuntu Base. I will then perform another snapshot, by clicking on the ‘Create’ button again, as shown in Figure 10.

Figure 10.jpg

FIGURE 10

Rolling Back an Update

If I want to roll back the update I just performed, then I need to click on the previous snapshot (before I performed the update) and select the ‘Restore’ button. If you are unable to log into your system, you can use a bootable USB stick and install Timeshift, access the snapshots and perform a restore.
It may be best to perform a snapshot before each update so you can basically ‘Undo’ the update performed.
You may want to keep the snapshots on a separate drive than the filesystem if the filesystem drive should be become corrupted.

NOTE: Timeshift is a good program to add the USB fix Stick found at https://www.linux.org/threads/creating-a-fix-stick.18151/.

Changing Settings

To change any settings made during the original Setup Wizard you can click on the ‘Wizard’ button to perform the Setup wizard again.
To make minor changes more easily, you can also select the ‘Settings’ button and see the individual settings for each screen on a tab.
 


Just a note on technical accuracy here, Jarret :)

The main addition to Linux Mint 19 is the program Timeshift.

Timeshift was actually incorporated into the 18.3 series 'Sylvia' released 27 November 2017.

Cheers

Chris Turner
wizardfromoz
 
On June 29th, 2018 Linux Mint 19 was released. Release 19 is code-named ‘Tara’ and has Long-Term Support (LTS) until 2023 and it uses the Ubuntu 18.04 package base. The main addition to Linux Mint 19 is the program Timeshift.
This article will cover the use of Timeshift.

Features

Timeshift allows a user to create a snapshot of their system. When any updates are applied the Timeshift program can be used to “rollback” the changes if they should cause problems with the system. The function is like the System Restore feature in Windows or the Time Machine program in Mac OS.
Basically, a snapshot is made of the system (a full backup). When other snapshots are made, they are the differences made since the previous snapshots. The first snapshot will be the size of the disk space used on the drive (minus any folders not included in the snapshot).
Let’s take a minor little laptop I use which has Lubuntu 18.04 and a 160 GB hard disk. Lubuntu’s system files and my files only take up about 12 GB. My initial snapshot will be 12 GB and every snapshot after will be the sum of the files which have changed since the last snapshot.

Installation

You do not need Linux Mint 19 to use Timeshift. Timeshift can be placed on most distros. To install Timeshift on Ubuntu based systems, use the following commands:

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift


To uninstall Timeshift you use the following command after you delete all of the snapshots you have saved:

sudo apt-get remove timeshift

NOTE: Snapshots will not be removed by the uninstall command.

Once you have Timeshift installed, run it to start the initial setup wizard.

Setup Wizard

Once Timeshift starts the first time a wizard will guide you through the setup. These settings can be changed later if needed.
The first screen, as shown in Figure 1, allows you to specify whether to use RSYNC or BTRFS for the snapshot.

View attachment 3283
FIGURE 1

RSYNC is a Linux command which allows for the backup of files with their metadata such as Timestamps included. BTRFS can be used, but the BTRFS tools must be installed and you can only save the snapshot to the system folder (not an external device). Click ‘Next’ to continue with the wizard.

NOTE: To install the BTRFS tools, use the command: ‘sudo apt-get install btrfs-tools’.

The next screen will detect the system size on the disk (Figure 2) then display the devices to which the backup can be stored as shown in Figure 3. Here, you will see that the used spaced is about 12 GB. Select the device to which you want to place the backup snapshot files and click ‘Next’.

View attachment 3284
FIGURE 2

View attachment 3285
FIGURE 3

The next setup screen allows you to choose when a snapshot is made and how many to keep (Figure 4).

View attachment 3286
FIGURE 4


You can specify to perform a snapshot Monthly, Weekly, Daily, Hourly and at every Boot. You can also specify how many of the snapshots to store before deleting. Older snapshots are deleted first.

NOTE: Boot snapshots will delay the booting process until the snapshot is completed.

The options can be left unchecked so you can perform the snapshot manually. Click ‘Next’ to continue.
The next screen, Figure 5, allows you to specify to include User Home folders in the snapshot. Including these can be useful for performing a complete restore of a system. Click ‘Next’ when you have made your selections.

View attachment 3287
FIGURE 5


The final screen of the Setup Wizard shows some information about your choices as well other suggestions that can be helpful as shown in Figure 6. click ‘Finish’ when you are done.

View attachment 3288
FIGURE 6

Creating a Snapshot

The main window of Timeshift is shown in Figure 7. No snapshots have been made yet and there are 27.8 GB of space available on my selected drive for snapshots. To create a snapshot, select the ‘Create’ button at the top-left of the window. A snapshot process will start as shown in Figure 8.

View attachment 3289
FIGURE 7

View attachment 3290
FIGURE 8

Keep in mind that the time required to finish the snapshot will depend on the amount of space used, the speed of the system performing the snapshot, the speed of the device where the snapshot will be stored, etc.

NOTE: My little laptop is only backing up 12 GB, but the system has an Intel Atom processor and I am saving the snapshot to an USB Stick.

After the snapshot is created, Figure 9, you can see the snapshot listed. To see the backed up files, you can right-click on the snapshot and select ‘Browse Files’.

View attachment 3291
FIGURE 9

After performing the snapshot, I will use the System Updater to perform an update of the Ubuntu Base. I will then perform another snapshot, by clicking on the ‘Create’ button again, as shown in Figure 10.

View attachment 3292
FIGURE 10

Rolling Back an Update

If I want to roll back the update I just performed, then I need to click on the previous snapshot (before I performed the update) and select the ‘Restore’ button. If you are unable to log into your system, you can use a bootable USB stick and install Timeshift, access the snapshots and perform a restore.
It may be best to perform a snapshot before each update so you can basically ‘Undo’ the update performed.
You may want to keep the snapshots on a separate drive than the filesystem if the filesystem drive should be become corrupted.

NOTE: Timeshift is a good program to add the USB fix Stick found at https://www.linux.org/threads/creating-a-fix-stick.18151/.

Changing Settings

To change any settings made during the original Setup Wizard you can click on the ‘Wizard’ button to perform the Setup wizard again.
To make minor changes more easily, you can also select the ‘Settings’ button and see the individual settings for each screen on a tab.
Supported until 2023..... :3 Sounds futuristic!..... :3 But IMHO, we're DECADES behind Back To The Future..... :D
 
I like Timeshift, used it to create backups on an archlinux installation. The wizard took me through the steps as described. I also set up cron. However I want to change the settings now. I cant get the wizard to re-appear.
That's even after dleting my backups on the ocmmand line (--delete-all) and manually deleting /etc/timeshift.json

How do I get the wizard back - can you tell me?
 
On my Mint installation there is a "Wizard" icon on Timeshift's main screen, it's the last icon on the action menu bar.
 
  • Like
Reactions: Rob
timeshift helped me out recently - great! But: I have two PC and I want to backup and share the external drive. Does timeshift allow different destination folder for different PCs?
 
You can specify the snapshot location and make it any drive you want it to be.
 

Staff online

Members online


Top