Backing Up Your Linux System

Hard drives die. Files get accidentally deleted. Updates occasionally go sideways. Backups are the seatbelt you never think about -- until you really, really need one.

Why backups matter

Let's get the uncomfortable talk out of the way: "It won't happen to me" is what everyone says right up until it happens to them.

Here are some completely normal things that can ruin your day:

Backups take a few minutes to set up and then they run on their own. Without them, you're one bad day away from losing everything -- photos, documents, projects, the whole lot.

The best time to set up backups was yesterday. The second best time is right now. Seriously -- read this page and do it today.

Two kinds of backups

Before we dive in, let's clear up the two main approaches. You don't have to choose just one -- in fact, using both is ideal.

1. Full system snapshots

This saves everything -- your operating system, your apps, your settings, all of it. If your system breaks, you can roll back to exactly how it was before. Think of it like System Restore on Windows, but better.

Best for: Recovering from broken updates, bad configs, or system-level mistakes.

Tool: Timeshift (covered below).

2. Personal file backups

This saves your stuff -- documents, photos, music, videos, project files. The things that are actually irreplaceable. If your hard drive dies, your system can be reinstalled in 20 minutes, but your family photos are gone forever without a backup.

Best for: Protecting against hardware failure, accidental deletion, or theft.

Tools: rsync, Deja Dup, simple file copy (all covered below).

Use both. Timeshift protects your system. File backups protect your stuff. Together, you're covered no matter what goes wrong.

Timeshift -- the easiest system backup

If you've ever used System Restore on Windows, Timeshift is basically that, but more reliable. It takes a snapshot of your entire system at a point in time. If an update breaks something or you mess up a config, you just roll back to the last good snapshot. Done.

Timeshift comes pre-installed on Linux Mint. On other distros, you'll need to install it.

Installing Timeshift

Open a terminal and run the command for your distro:

# Ubuntu, Mint, Pop!_OS, and other Debian-based distros
sudo apt install timeshift

# Fedora
sudo dnf install timeshift

# Arch, Manjaro, EndeavourOS
sudo pacman -S timeshift

Setting up automatic snapshots

  1. Open Timeshift from your app menu (it'll ask for your password since it works with system files).
  2. Choose RSYNC as the snapshot type. (The other option, BTRFS, is only for systems using the Btrfs filesystem. If you don't know what that is, pick RSYNC.)
  3. Pick the drive where snapshots will be stored. Your main drive works fine, but an external or second internal drive is even better.
  4. Set a schedule. A good starting point:
    • Monthly: keep 2
    • Weekly: keep 3
    • Daily: keep 5
    This keeps about a month of history without eating too much disk space.
  5. On the Users tab, leave everything at the default. Timeshift is for system files, not personal files (we'll cover personal file backups next).
  6. Click Finish. Timeshift will automatically create snapshots on your chosen schedule.
Create a snapshot before big changes. About to run a major system update or install something you're not sure about? Open Timeshift and click "Create" to make a quick manual snapshot first. It's your undo button.

Restoring from a Timeshift snapshot

If something breaks, restoring is straightforward:

  1. Open Timeshift.
  2. Select the snapshot you want to restore to (pick one from before things went wrong).
  3. Click Restore.
  4. Review what will be changed and confirm.
  5. Wait for it to finish, then reboot.

Your system will be back to the state it was in when that snapshot was taken. Your personal files in /home are not affected by default -- only system files get rolled back.

What if I can't even boot into my system to open Timeshift?

No worries -- you can restore from a live USB. See the "Emergency restore" section at the bottom of this page.

Backing up your personal files

Timeshift handles your system. Now let's protect the stuff you actually care about: your documents, photos, music, projects, and anything else in your home folder.

There are a few ways to do this, from dead simple to slightly more advanced.

Option 1: Just copy them

The simplest backup in the world: plug in an external drive and copy your files to it.

  1. Plug in a USB drive or external hard drive.
  2. Open your file manager.
  3. Copy your Documents, Pictures, Music, Videos, and any other important folders to the external drive.
  4. Done.

The downside? You have to remember to do this regularly. And every time, it copies everything again, even files that haven't changed. That's slow if you have a lot of data.

For something smarter, use rsync.

Option 2: rsync -- one command to sync your files

rsync is a command-line tool that copies files intelligently. It only copies what's changed since last time, so after the first backup, it's fast. It comes pre-installed on almost every Linux distro.

Here's the one command you need:

rsync -av --delete /home/yourname/ /media/yourname/BackupDrive/home-backup/

Let's break that down:

Replace "yourname" with your actual username, and "BackupDrive" with the name of your external drive. If you're not sure, open your file manager and check where the drive is mounted.

Run this command whenever you want to back up. The first time takes a while. After that, it only copies new or changed files, so it's quick.

How do I make rsync run automatically?

You can set up a cron job (a scheduled task) to run rsync on a timer. Open a terminal and type:

crontab -e

Add this line at the bottom to back up every day at 2 AM:

0 2 * * * rsync -a --delete /home/yourname/ /media/yourname/BackupDrive/home-backup/

Save and close. The backup will run silently in the background every day (as long as the external drive is plugged in).

Option 3: Deja Dup -- graphical backup tool

If you'd rather not touch the terminal, Deja Dup (also called "Backups") is a friendly graphical tool. It's built into Ubuntu and some other distros. If you don't have it:

# Ubuntu, Mint, Pop!_OS
sudo apt install deja-dup

# Fedora
sudo dnf install deja-dup

Setting it up:

  1. Open Backups from your app menu.
  2. Choose what to back up. Your home folder is selected by default, which is usually what you want.
  3. Choose what to ignore. The Trash and Downloads folders are excluded by default -- you can add more if you want.
  4. Choose where to store your backup. Pick your external drive, a network drive, or even Google Drive.
  5. Turn on Automatic Backups and pick how often (daily or weekly).
  6. Click Back Up Now to run your first backup.

To restore files later, just open Deja Dup and click Restore. You can restore everything or pick specific files and folders.

Deja Dup keeps old versions. If you accidentally overwrote a document last week, you can go back and grab the previous version. It's not just a mirror -- it's a time machine for your files.

Cloud backup options

An external drive is great, but what if your house floods or your laptop gets stolen? Having a copy somewhere else -- "offsite" -- protects you from the really bad scenarios. Here are a few options:

The 3-2-1 rule

This is the golden rule of backups, used by professionals everywhere. It's simple:

That sounds like a lot, but in practice it might look like this:

  1. Your files on your computer (copy 1)
  2. An rsync backup to an external hard drive on your desk (copy 2, different storage)
  3. Syncthing syncing to a computer at your office, or rclone to a cloud service (copy 3, offsite)

Even if you just manage two of these, you're already way ahead of most people. Don't let perfect be the enemy of good -- any backup is infinitely better than no backup.

What to back up (and what you can skip)

Definitely back up

You can probably skip

Keep a list of your installed apps. You can regenerate this list anytime with a quick command. On Ubuntu/Mint: dpkg --get-selections > my-apps.txt. On Fedora: dnf list installed > my-apps.txt. Save that file with your backups -- it makes reinstalling everything much faster.

Emergency restore: when everything goes wrong

Worst case scenario: your system won't boot at all. Maybe an update bricked things, maybe a drive is failing. Here's how you get back on your feet.

Restoring a Timeshift snapshot from a live USB

If you can't boot into your system, you can restore a Timeshift snapshot using a live USB. Here's how:

  1. Boot from a live USB. Use the same distro's live USB that you have installed (for example, a Linux Mint USB if you're running Mint). See our installation guide if you need help creating one.
  2. Install Timeshift on the live session (it won't be there by default on most distros):
    sudo apt install timeshift
  3. Open Timeshift. It will detect your existing snapshots on your hard drive automatically.
  4. Select the snapshot you want to restore and click Restore.
  5. Wait for it to finish, then remove the USB and reboot.

Your system should be back to the state it was in when that snapshot was taken.

Restoring personal files from an rsync backup

If you've reinstalled your system from scratch and want to bring your files back from an rsync backup:

  1. Plug in the external drive with your backup.
  2. Open a terminal.
  3. Copy your files back:
    rsync -av /media/yourname/BackupDrive/home-backup/ /home/yourname/
  4. That's it. Your documents, photos, configs, and everything else will be back where they were.

If you only want to restore specific folders, just adjust the paths:

rsync -av /media/yourname/BackupDrive/home-backup/Documents/ /home/yourname/Documents/
Full disaster recovery: mounting your drive and copying files manually

If your system is completely toast but the hard drive still works, you can pull files off it using a live USB:

  1. Boot from a live USB.
  2. Find your drive. Open a terminal and run:
    lsblk

    Look for your main drive (usually something like sda1 or nvme0n1p2). The size should help you identify the right one.

  3. Mount the drive:
    sudo mkdir /mnt/recovery
    sudo mount /dev/sda2 /mnt/recovery

    (Replace sda2 with your actual partition from the previous step.)

  4. Copy your files to an external drive:
    cp -r /mnt/recovery/home/yourname/Documents /media/yourname/ExternalDrive/
    cp -r /mnt/recovery/home/yourname/Pictures /media/yourname/ExternalDrive/

    Repeat for any folders you want to save.

  5. Unmount and reinstall:
    sudo umount /mnt/recovery

    Now you can reinstall your distro fresh and copy the files back from the external drive.

Quick-start checklist

Don't overthink it. Here's the simplest path to being protected:

  1. Install Timeshift and set up automatic weekly snapshots. (10 minutes)
  2. Get an external drive and set up rsync or Deja Dup to back up your home folder. (15 minutes)
  3. If you want offsite backup, set up Syncthing to another device or rclone to a cloud service. (30 minutes)

That's it. Less than an hour of setup, and you never have to worry about losing your files again.