How To Backup and Restore Ubuntu & Linux Mint With Timeshift Jul 13, 2020 Raj 5 min read CONTENTS Install Timeshift Take System Backup with Timeshift Snapshot Type Backup Location Scheduled Snapshots Include Home Directories Take First Backup Restore System With Timeshift Running System Non-Bootable System Conclusion SHARE Timeshift is a backup and system restoration utility for Linux operating systems similar to the System Restore feature in Windows operating system. This tool protects the system by taking incremental snapshots of a filesystem at regular intervals. It uses RSYNC and BTRFS mode for taking the snapshots. These snapshots can be restored at a later point of time to revert the changes made to the system or to recover the unbootable operating system. Timeshift is designed to protect only system files and settings, not user documents. However, you can enable the backup of the user documents if needed. Install Timeshift Timeshift packages are available in Launchpad PPA for Ubuntu & Linux Mint. For Ubuntu 20.04 / Linux Mint 20/19.3, Timeshift is available in the base repository. So, you do not need to set up PPA. Set up the PPA with the below command. sudo add-apt-repository -y ppa:teejee2008/ppa Update the repository index. sudo apt update Install Timeshift with the below command. sudo apt install -y timeshift Take System Backup with Timeshift Open the Timeshift from the respective graphical interface. Ubuntu: Activities » Search for Timeshift. Linux Mint: Menu » Administration » Timeshift. Enter your password if you get an authentication window. Follow the backup wizard to configure Timeshift. Snapshot Type Select the Snapshot Type based on your system. RSYNC supports all the file system types and BTRFS supports only the backup of BTRFS filesystems. In RCYNC mode, snapshots are taken by copying files using rsync and hard-linking unchanged files from the previous snapshots to save disk space. Each snapshot is a full system backup. Snapshots can be saved any disk formatted with a Linux file system. Saving snapshots on non-root disk or on the external disk which allows the system to be restored even if the operating system is not booting. In BTRFS mode, snapshots are taken using the built-in features of the BTRFS file system. Snapshots are created and restored instantly without burdening the system. Snapshots are stored in on the same disk from which they are created (system disk). If the system disk fails then your snapshots will be lost. Choose RSYNC and click Next. Snapshot Type Backup Location Timeshift supports storing snapshots only on Linux file systems. Windows file systems, remote and network storages are not supported. Snapshots are stored in /timeshift of the selected partition. If /backup partition is selected for storing the snapshots then snapshots will be in /backup/timeshift. During the initial setup, Timeshift will calculate the required space for storing snapshots and may show you a warning if the selected partition is short of the required space. Choosing external storage for storing snapshots would be recommended as you can able to restore your system in case of system disk corruption or the system is not bootable. Here, I am using a USB stick for storing snapshots. USB Drive NOTE: You need to format the USB stick with ext4 or other Linux file system type. sudo umount /dev/sdb1 sudo mkfs.ext4 -f /dev/sdb1 Choose the partition and click Next. Snapshot Location Scheduled Snapshots You can schedule automated snapshots at a standard interval – Hourly, Daily, Weekly, Monthly, or at the system boot with a delay of 10 mins. You can choose to retain a number of snapshots for a selected schedule. Schedule Snapshots Include Home Directories Timeshift is designed to protect only system files and settings, not user documents. However, you can enable the backup of /home directory (disabled by default) if needed. If the home directories included in system backup, the data will be overwritten when you restore the snapshot. Home Directories Click Finish. Take First Backup Click the Create button to start your first system snapshot. Timeshift Window The snapshot creation would take time and it depends on the size of system data. Snapshot In Progress Once the snapshot is taken, you would see it in the snapshot list. Snapshots Restore System With Timeshift Running System For testing the system restoration, I am deleting the /var/log directory and will restore the directory with the Timeshift. Delete Directory Snapshots can be restored by selecting a snapshot from the main window and clicking the Restore button on the toolbar. Save your work and close any open applications before you begin restoring the system from snapshot as Timeshift will reboot the system during the restoration. Restore Snapshot Click Next on Select Target Device Review the Files that will be restored Click Next on the Warning page System restore is in progress and the system will be rebooted automatically. System Restore In Progress Upon system reboot, validate if the /var/log directory has been restored. Validate Restoration Non-Bootable System For testing the system restoration, I am deleting the / to make the system non-bootable and will restore the directory with the Timeshift. Try this on your own RISK as deleting root filesystem make system non-bootable. You would get a screen similar to below when you delete / directory. System After Deletion Of Root Boot your system with Ubuntu/Linux Mint live cd and install the Timeshift. ### Ubuntu 20.04 ### sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ focal universe" sudo apt install -y timeshift ### Other Ubuntu Versions & Ubuntu Derivatives ### sudo add-apt-repository -y ppa:teejee2008/ppa sudo apt update sudo apt install -y timeshift Linux Mint live cd already has Timeshift installed. If Linux Mint live cd doesn't have Timeshift installed, follow the above Ubuntu derivatives steps to install Timeshift. Open the Timeshift and choose RSYNC and then click Next. Select the partition where the snapshots are stored and then click Next. Select Snapshot Partition Now, Timeshift will list the available snapshots to restore. Available Snapshots Select the snapshot you want to restore and then click Restore. Restore Snapshot Review the Files that will be restored Click Next on the Warning page System restore is in progress. Restoring Snapshot Upon completion of the system restore, reboot your system. Restore Completed Your system should boot fine like earlier. System After Restore Conclusion That’s All. I hope you have learned how to backup and restore the Ubuntu & Linux Mint systems with Timeshift. Please share your feedback in the comments section. ubuntu-20.04 ubuntu-18.04 linuxmint-20 linuxmint-19 timeshift backupandrestore Prev Post How To Upgrade To Linux Mint 20 From Linux Mint 19 [Detailed Guide] Next Post How To Install VirtualBox On Linux Mint 20 RELATED POSTS How To Upgrade To Linux Mint 20 From Linux Mint 19 [Detailed Guide] How To Install KVM On Ubuntu 20.04 / Linux Mint 20 How To Install Plex Media Server On Ubuntu 20.04 / Linux Mint 20 How To Upgrade To Ubuntu 20.04 From Ubuntu 18.04 / Ubuntu 19.10 [Detailed Guide] How To Install Android Studio on Ubuntu 20.04 How To Install Eclipse IDE on Ubuntu 20.04 Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus RECENT POSTS How To Install VirtualBox On Linux Mint 20 How To Backup and Restore Ubuntu & Linux Mint With Timeshift How To Upgrade To Linux Mint 20 From Linux Mint 19 [Detailed Guide] How To Install KVM On Ubuntu 20.04 / Linux Mint 20 How To Install Plex Media Server On Ubuntu 20.04 / Linux Mint 20 How To Install Android Studio on Ubuntu 20.04 TOP POSTS Install xrdp on CentOS 7 / RHEL 7 Install Gnome GUI on CentOS 7 / RHEL 7 Change default network name (ens33) to old “eth0” on Ubuntu… Install μTorrent (uTorrent) on Ubuntu 14.04 How To Configure High-Availability Cluster on CentOS 7 /… How To Install and Configure VNC Server in CentOS 7 / RHEL 7