If you have any important data or files on your computer, you’ll want to back them up. Unfortunately, elementary does not have a curated backup option. But there are programs easily available from Flathub that will allow you to safely and securely back up your files.
This guide will show how to set up and use Déjà Dup Backups to backup your files on elementary OS. Déjà Dup is an application from the GNOME project and Ubuntu’s default desktop backup manager.
User Files vs. System Files
First, a brief note on exactly what is and is not being backed up. The backup discussed in this guide is a backup of all of your user files, which basically means everything in the /home folder of your machine. This will include all of your documents, photos, music, and videos, since they are all stored in this location. However, this backup will not be of system files, which means the backup will not contain information on which distribution you are on, nor will it include data on the version of the operating system, updates to the operating system, or the installed applications.
This is an important difference to some backup applications, such as Apple’s Time Machine, which can be used to roll back system updates or even downgrade to a previous version of MacOS if a backup was created before an OS update. If you are looking to create a backup of system settings and system files on Linux, check out the tool TimeShift. Importantly, TimeShift by default does not save any of the user files in the /home folder:
Timeshift is similar to applications like rsnapshot, BackInTime and TimeVault but with different goals. It is designed to protect only system files and settings. User files such as documents, pictures and music are excluded. This ensures that your files remains unchanged when you restore your system to an earlier date.
https://github.com/teejee2008/timeshift
It actually makes very good sense to keep system settings backups and user file backups separate. Say you want to test out a new Linux distro. You can use TimeShift to save your current configuration, and then try out a new distro for some time. During that time, you might make changes to your files. Thus, you would likely want to restore your old system settings, but also keep recent changes made to user files, and thus TimeShift is a perfect tool for that. Apple’s Time Machine, in this type of situation, can restore an older MacOS version after an update, but it would also restore the files to the state of that previous backup, which could mean a loss of any file updates.
This post won’t say anything more about system backups. The rest of this post will focus on backing up user files only, which should be the main thing to back up and sufficient for typical users.
Setting Up Déjà Dup Backups
There are two basic requirements to get started.
- First, install Déjà Dup Backups from AppCenter (or, if you have not installed anything from Flathub yet, download Déjà Dup from Flathub.org by clicking the big Install button).
- Second, you need to decide where you will save the backup. An external hard drive is a great option, and Déjà Dup Backups also supports backing up to Google Drive and NextCloud. (And OneDrive support is coming, see the documentation for the status of all supported cloud services.)
Creating a File Backup
Once installed from AppCenter, Déjà Dup Backups will be called simply Backups. Launch the application menu and search for Backups and launch the application.
You can just click “Create First Backup” and then select the location. I used an external hard drive formatted as ext4 format, since I am using this only with Linux systems. There are also options to use cloud services from Google Drive or NextCloud as the backup location.
The interface and settings are very intuitive and easy to navigate. For example, you can choose to schedule automatic backups or exclude certain folders from the backup. It shouldn’t be hard to configure the settings to exactly meet your needs.
Restoring an elementary Backup
When restoring your files, note that Déjà Dup Backups saves the files in an opaque file structure, which means that you will need Déjà Dup Backups (or another Duplicity-based program) to restore the files. Thus when restoring files on a fresh operating system install or a new user account, the first thing to do is install the Backups application.
Once Backups is installed, you can launch it and choose “Restore from a Previous Backup.” Once your files are restored, you will be good to go. Though as mentioned above, this backup will not include any applications or system settings, so you will need to re-install programs that you used on your previous install.
For more details and troubleshooting on a full restore, you can see the Restore Help Pages for Deja Dup.