Backup snapshots are a must have. Find out how to create them in Linux with Timeshift.
Timeshift is that app so many Linux users (both end users and admins) have searched for. What is Timeshift? It's a back-up utility that can not only back up your data, but it can back up your entire drive as a snapshot, which also includes all of your configurations. In other words, should something go wrong on your machine, you can always go back to a restore point and return that system to a working configuration.
Let's install Timeshift and see how it's used.
SEE: Choosing your Windows 7 exit strategy: Four options (Tech Pro Research)
I'll demonstrate Timeshift on Pop!_OS.
In order to install Timeshift, you need to first add a repository with the following command:
sudo apt-add-repository -y ppa:teejee2008/ppa
Once the repository is added, install Timeshift by issuing the command below:
sudo apt-get update sudo apt-get install timeshift -y
If you're running Fedora, or another RPM-based distribution, you can install Timeshift (without adding the repository) with the command:
sudo dnf install timeshift
That's it. Timeshift is ready to go.
Creating a backup
Locate Timeshift in your desktop menu and launch the app. You'll be required to type your password before the app will open. With Timeshift ready (Figure A), click the Wizard button.
The Setup Wizard (Figure B) will ask you to select the snapshot type.
You will be given the choice of RSYNC or BTRFS. These two types of snapshots are quite different:
- With Rsync, if any changes have been made to files, a new copy of the file will be created and backed up. Rsync snapshots consume much more space than BTRFS snapshots.
- With BTRFS, snapshots are done at the block level. If you make any changes to a file, only those changed blocks are backed up. BTRFS snapshots use less space than Rsync snapshots and are much faster to create.
The one caveat to BTRFS snapshots is that Linux must be installed on a BTRFS partition. If there is no BTRFS partition, you are limited to only Rsync-type snapshots.
- Select your snapshot type and click Next.
- You will now be required to select the storage location of your snapshot (Figure C).
- Select where you want to house your snapshots and click Next.
- In the resulting window (Figure D), configure the level of snapshot you want to retain (Hourly, Daily, Weekly, Monthly, Boot).
Select what levels of snapshots you want to keep (and then how many of each) and click Finish. The snapshot will be scheduled and run via cron. You can also click the Create button from the main window to launch the immediate creation of a snapshot. Once the snapshot is created, you gain access to more options, by clicking Settings in the main window.
By default, user home directories are excluded from the snapshot. If you want to include them, open the settings window, click the Users tab and then select what you want to include (Figure E).
Once configured, Timeshift continues creating your snapshots, based on your configuration, until needed. Should you run into a problem with your system, open Timeshift, select the snapshot you want to restore to, and click Restore.
Consider this a requirement
Backups should be considered a requirement. Period. The last thing you want is to find yourself in a situation where something goes awry, and your machine functions improperly. Let Timeshift do its thing and hope you never have to depend on it.
- How to back up Linux directories over a network with the restic app (TechRepublic)
- How to install and use the Duplicati cloud backup solution (TechRepublic)
- How to use FreeFileSync to back up your cloud directories (TechRepublic)
- How to install the networkable UrBackup (TechRepublic)
- Some Elasticsearch security features are now free for everyone (ZDNet)
- DevOps: A cheat sheet (TechRepublic)
- Programming languages and developer career resources coverage (TechRepublic on Flipboard)
- 10 free alternatives to Microsoft Word and Excel (TechRepublic download)
- The 10 most important iPhone apps of all time (Download.com)
- It takes work to keep your data private online. These apps can help (CNET)