A Comprehensive Guide to Setting Up System Backups on Linux Mint

Learn how to set up system backups on Linux Mint using Timeshift, Déjà Dup, Rsync, and cloud services. Protect your data and system configurations with this comprehensive guide.

Introduction

In the digital age, data is invaluable. Whether it’s cherished personal photos, critical work documents, or system configurations, losing data can be devastating. Linux Mint, a user-friendly distribution based on Ubuntu, offers robust tools to safeguard your system and data. This guide walks you through setting up system backups using native and third-party tools, ensuring you’re prepared for any data loss scenario.


Why Backups Matter

System failures, accidental deletions, malware, or hardware crashes can strike unexpectedly. Backups act as a safety net, allowing you to restore your system to a previous state. Linux Mint distinguishes between two backup types:

  1. System Backups: Capture the operating system, installed software, and configurations.
  2. Data Backups: Protect personal files (documents, downloads, etc.).

For full protection, combine both. Let’s explore how.


Prerequisites

Before starting:

  • Ensure Linux Mint is installed and updated.
  • Have sudo privileges.
  • Allocate storage space (external drive, NAS, or cloud).
  • Backup sensitive data manually if this is your first setup.

Method 1: Timeshift for System Snapshots

What is Timeshift?
Timeshift is Linux Mint’s built-in tool for system snapshots, similar to Windows System Restore. It safeguards your OS and applications but excludes personal files by default.

Installation
Timeshift is pre-installed on Linux Mint 20+. If missing:

sudo apt install timeshift  

Configuration

  1. Launch Timeshift: Open the Menu → Search “Timeshift” → Run as administrator.
  2. Choose Snapshot Type:
    • RSYNC: Works on any filesystem (recommended for most users).
    • BTRFS: Requires a BTRFS-formatted partition (advanced users).
  3. Select Backup Location: Use an external drive or separate partition (avoid backing up to the same disk).
  4. Set Schedule:
    • Hourly/Daily/Weekly/Monthly: Balance frequency and storage space.
    • Retention: Keep 2–5 daily snapshots to avoid filling storage.
  5. Exclude Files: Skip large directories (e.g., /home if using a separate data backup).

Creating a Manual Snapshot
Click “Create” to generate an on-demand snapshot before system changes (e.g., software updates).

Restoring from a Snapshot

  1. Boot into a live Linux Mint USB if the system is unbootable.
  2. Open Timeshift, select a snapshot, and click “Restore.”

Method 2: Déjà Dup for Personal Files

What is Déjà Dup?
Déjà Dup (Backups) is a simple GUI tool for backing up personal files. It supports encryption, compression, and cloud storage.

Configuration

  1. Launch Déjà Dup: Menu → Search “Backups.”
  2. Set Storage Location:
    • Local/External Drive: Navigate to the desired folder.
    • Cloud: Connect to Google Drive, Nextcloud, or SSH/SFTP.
  3. Folders to Back Up:
    • Include /home/username/Documents, /Pictures, etc.
    • Exclude large or temporary folders (e.g., Downloads, .cache).
  4. Schedule: Automate daily/weekly backups.
  5. Encryption: Enable to protect sensitive data with a passphrase.

Performing a Backup
Click “Back Up Now” and monitor progress in the notification area.

Restoring Files

  1. Open Déjà Dup → Click “Restore.”
  2. Choose a backup date → Select files/foldables → Restore to original or custom location.

Method 3: Advanced Backups with Rsync and Cron

Using Rsync
rsync is a command-line tool for efficient file synchronization.

Basic Command

sudo rsync -aAXhv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup  
  • -aAXhv: Archive mode, preserve permissions, extended attributes, and human-readable output.
  • --exclude: Skip non-essential directories.

Automate with Cron

  1. Create a backup script (backup.sh):
#!/bin/bash  
sudo rsync -aAXhv --delete --exclude=... / /path/to/backup  
  1. Make it executable:
chmod +x backup.sh  
  1. Schedule with Cron:
crontab -e  

Add this line for daily backups at midnight:

0 0 * * * /path/to/backup.sh  

Method 4: Cloud Backups (Optional)

Tools like Rclone or Duplicati can sync data to cloud services (Google Drive, Dropbox).

Example: Rclone Setup

  1. Install:
sudo apt install rclone  
  1. Configure:
rclone config  

Follow prompts to link your cloud account.
3. Sync files:

rclone sync /home/username/Documents remote:backup  

Best Practices

  1. 3-2-1 Rule: Keep 3 copies, on 2 media, with 1 offsite.
  2. Test Restores: Periodically verify backups to ensure integrity.
  3. Monitor Storage: Avoid running out of space with automated cleanup.
  4. Document Your Strategy: Note backup locations, schedules, and passwords.

Conclusion

Setting up backups on Linux Mint is straightforward with tools like Timeshift and Déjà Dup. For advanced users, rsync and cron offer flexibility, while cloud services add offsite security. By implementing a layered approach, you’ll protect both your system and data from unexpected disasters. Start today—your future self will thank you!

Further Reading

By following this guide, you’ll transform from a backup novice to a prepared Linux Mint user, ready to tackle any data loss challenge with confidence.


Last modified 20.02.2025: new kotlin and mint content (93a1000)