A Comprehensive Guide to Setting Up System Backups on Linux Mint

Categories:
4 minute read
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:
- System Backups: Capture the operating system, installed software, and configurations.
- 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
- Launch Timeshift: Open the Menu → Search “Timeshift” → Run as administrator.
- Choose Snapshot Type:
- RSYNC: Works on any filesystem (recommended for most users).
- BTRFS: Requires a BTRFS-formatted partition (advanced users).
- Select Backup Location: Use an external drive or separate partition (avoid backing up to the same disk).
- Set Schedule:
- Hourly/Daily/Weekly/Monthly: Balance frequency and storage space.
- Retention: Keep 2–5 daily snapshots to avoid filling storage.
- 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
- Boot into a live Linux Mint USB if the system is unbootable.
- 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
- Launch Déjà Dup: Menu → Search “Backups.”
- Set Storage Location:
- Local/External Drive: Navigate to the desired folder.
- Cloud: Connect to Google Drive, Nextcloud, or SSH/SFTP.
- Folders to Back Up:
- Include
/home/username/Documents
,/Pictures
, etc. - Exclude large or temporary folders (e.g.,
Downloads
,.cache
).
- Include
- Schedule: Automate daily/weekly backups.
- 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
- Open Déjà Dup → Click “Restore.”
- Choose a backup date → Select files/foldables → Restore to original or custom location.
Method 3: Advanced Backups with Rsync and Cron
Using Rsyncrsync
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
- Create a backup script (
backup.sh
):
#!/bin/bash
sudo rsync -aAXhv --delete --exclude=... / /path/to/backup
- Make it executable:
chmod +x backup.sh
- 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
- Install:
sudo apt install rclone
- Configure:
rclone config
Follow prompts to link your cloud account.
3. Sync files:
rclone sync /home/username/Documents remote:backup
Best Practices
- 3-2-1 Rule: Keep 3 copies, on 2 media, with 1 offsite.
- Test Restores: Periodically verify backups to ensure integrity.
- Monitor Storage: Avoid running out of space with automated cleanup.
- 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.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.