Easy Linux Desktop Backups: A Practical Guide
In this article
To easily back up your files on desktop Linux, use a tool like Déjà Dup (also called Backups) or Timeshift, which automate the process with scheduled snapshots to an external drive or network location. This guide explains the core concepts, walks through setting up these tools, and covers how to choose a strategy that fits your needs.
Why Backups Matter on Linux
Linux is generally stable, but that doesn't make your data immune to hardware failure, accidental deletion, ransomware, or a botched system update. Unlike cloud-synced folders on some other operating systems, your local files on Linux are only on your machine unless you copy them elsewhere. A proper backup strategy ensures you can recover a single file or your entire system without panic. The good news is that Linux offers several mature, free, and open-source tools that make this process nearly hands-off.
Core Concepts: Snapshots vs. File Backups
Before choosing a tool, understand the two main approaches. File backups copy your files and folders, like documents and photos, to another location. System snapshots capture the entire operating system state, including installed programs and system settings, allowing you to restore your computer to a previous working condition. Many users combine both: a file backup for personal data and a system snapshot for the OS itself.
Another key concept is incremental backups. Instead of copying everything each time, most tools only copy what has changed since the last backup, saving time and storage space. They then create a restore point that logically combines the full backup with the increments.
Choosing the Right Tool for Your Needs
For most desktop users, the simplest reliable options are:
- Déjà Dup (often pre-installed as “Backups”): A front-end for the command-line tool
duplicity. It performs encrypted, incremental file backups to a local folder, external drive, or cloud service (like Google Drive or Nextcloud). Its interface is clean and geared toward non-technical users. - Timeshift: Designed specifically for system snapshots. It uses
rsyncor Btrfs snapshots to capture the operating system, making it ideal for restoring your system after a bad update or a configuration mistake. It is not meant for personal files. - rsync: A powerful command-line tool for syncing folders. It’s flexible and scriptable, but requires more manual setup. For example,
rsync -av /home/me/Documents /media/backup/copies the Documents folder to a mounted drive.
If you want a single tool that does both, you can use BorgBackup with the Vorta front-end. Borg offers deduplication (storing only unique chunks of data) and encryption, making it very efficient for large amounts of data.
How to Set Up a Simple File Backup with Déjà Dup
Here is a step-by-step guide for the most common approach:
- Open “Backups” from your application menu (or install
deja-dupvia your package manager). - Click “Create Your First Backup” or go to “Backup Location” in settings.
- Choose a destination: an external USB drive, a network share (like NFS or SMB), or a cloud service. For a local drive, it must be mounted and writable.
- In “Folders to Save”, select your home directory or specific folders like
Documents,Pictures, andDesktop. By default, it excludes trash and temporary files. - Set a schedule under “Automatic Backup”: daily, weekly, or monthly. For most users, daily is a good balance.
- Click “Back Up Now” to run the first backup. The initial run copies everything; subsequent runs are incremental and faster.
To restore a file, open the Backups app, click “Restore”, choose the backup date, and select the files you want. You can restore to the original location or a different folder.
Setting Up System Snapshots with Timeshift
Timeshift is equally straightforward:
- Install Timeshift via your package manager (e.g.,
sudo apt install timeshifton Debian/Ubuntu). - Launch it; it will ask for your password and then detect your filesystem type.
- Choose the snapshot type: Rsync (works on any filesystem) or Btrfs (if your system is on Btrfs, which is faster and uses less space).
- Select the destination drive. It should be a different physical disk than your system drive to protect against drive failure.
- Set a schedule (e.g., daily, weekly, monthly) and choose how many snapshots to keep. A common setting is daily snapshots for 5 days, weekly for 4, and monthly for 3.
- Click “Create” to take a manual snapshot immediately.
To restore, boot from a live USB, install Timeshift there, and point it to your backup drive. Alternatively, you can restore from within the running system if it still boots.
Common Mistakes and How to Avoid Them
Several pitfalls trip up new Linux backup users:
- Backing up to the same drive: If your hard drive fails, you lose both the originals and the backups. Always use a separate physical disk or a network location.
- Not testing restores: A backup is only useful if you can restore from it. Periodically test restoring a few files or a snapshot to a spare machine.
- Ignoring encryption: If you back up to a cloud service, ensure the tool encrypts your data. Déjà Dup and Borg encrypt by default; rsync does not.
- Forgetting to keep the backup drive connected: Scheduled backups will fail silently if the destination is not mounted. Some tools show a notification, but it’s easy to miss.
- Only backing up the system, not files: Timeshift is not a replacement for file backups. If you accidentally delete a document, a system snapshot won’t help unless you restore the entire system.
Costs, Safety, and Alternatives
All the tools mentioned are free and open-source. The only costs are the storage media (external drives, NAS, or cloud storage subscriptions) and your time to set them up. For safety, always keep at least two copies of important data, ideally in different locations (e.g., one external drive at home, one cloud backup). This is the classic “3-2-1” rule: three copies, two different media, one off-site.
Alternatives worth mentioning include Restic (a fast, secure backup program that works with many cloud providers), Rclone (for syncing to cloud services), and Syncthing (for continuous file synchronization between your own devices, though not a true backup). For enterprise-grade solutions, Bareos or UrBackup exist, but they are overkill for a desktop.
Frequently Asked Questions
Do I need to back up my entire home folder?
Not necessarily. You can exclude large, easily re-downloadable files like Steam games or ISO images. Focus on documents, photos, configuration files (like .bashrc or .config), and any project code. Déjà Dup lets you exclude specific subfolders easily.
Can I back up to a Windows or NAS drive?
Yes. Linux can mount NTFS, FAT32, and network shares (SMB/CIFS) and back up to them. Just ensure the drive is mounted before the backup runs. Some tools like Déjà Dup support SMB shares directly in the destination selection.
What is the difference between rsync and a backup tool?
rsync is a file synchronization tool; it mirrors the source to the destination, deleting files on the destination that were deleted on the source. A backup tool like Déjà Dup keeps historical versions, so you can recover a file that was deleted months ago. If you use rsync, consider adding a script to keep rotated snapshots (e.g., using --backup-dir).
Is cloud backup safe for sensitive data?
Yes, if you use a tool that encrypts your data before uploading. Déjà Dup and Borg encrypt with a password you control. However, you must remember that password; if you lose it, your backups are unrecoverable. Also, be aware of the cloud provider’s privacy policy.
How often should I back up?
It depends on how much data you can afford to lose. For most users, a daily file backup and a weekly system snapshot is a good balance. If you work on critical documents, consider an hourly backup or use a cloud sync service for that folder.
Why does my backup take so long the first time?
The first backup copies all selected data, which can be gigabytes. Subsequent backups are incremental, so they only copy changes, making them much faster. If you have a large amount of data, consider using a tool like Borg that deduplicates to reduce storage and speed up future runs.