The best ways to back up files on Ubuntu combine a scheduled tool like Déjà Dup (which wraps rsync) for automatic snapshots, plus a separate copy on an external drive or cloud service for off-site safety. For most users, that means setting up Déjà Dup to run daily to an external USB drive, and adding a cloud sync like Nextcloud or a manual rsync to a remote server for critical files.
Why Backing Up on Linux Is Different
Ubuntu doesn't ship with a built-in Time Machine-style tool, but it includes the powerful rsync command-line utility and a graphical front-end called Déjà Dup (installed by default in recent versions). The Linux philosophy of "everything is a file" means you can back up the entire system, but it also means permissions and ownership matter—a simple copy with a file manager can silently break your setup. Understanding this distinction is the first step to choosing a method that actually works when you need it.
How Ubuntu Backup Tools Work
Most backup tools on Ubuntu are built on rsync, which copies only the changed parts of files (incremental updates). Déjà Dup adds encryption, compression, and a schedule on top of rsync, storing backups in a special format that can be browsed in a file manager. The timeshift tool, by contrast, takes snapshots of the entire system using rsync or Btrfs snapshots, designed for rolling back system updates rather than recovering individual files. Cloud sync tools like Nextcloud or rclone simply mirror files to a remote server, which is not a true backup if you delete a file locally—it deletes on the server too.
How to Choose the Right Method
Your choice depends on what you're protecting. Ask yourself: Do I need to recover a single deleted document, or my entire system after a hard drive failure? For documents, photos, and config files, a file-level backup with Déjà Dup is sufficient. For a complete system restore, you need a disk image (using dd or Clonezilla) or a system snapshot tool like Timeshift. For most home users, a combination of Déjà Dup for files and Timeshift for system snapshots covers both scenarios.
Step-by-Step: Set Up Déjà Dup (GUI)
- Open Settings → Backups (or launch
deja-dupfrom the activities overview). - Click Create Your First Backup.
- Choose a destination: an external USB drive, a network location (SSH, FTP, WebDAV), or a cloud service like Google Drive (via GNOME Online Accounts).
- Under Folders to save, keep your home directory or select specific folders like
DocumentsandPictures. - Under Folders to ignore, add
DownloadsandTrashto avoid wasting space. - Set the schedule: Daily or Weekly is a good starting point.
- Choose Keep at least to retain backups for 6 months or a year.
- Click Back Up Now to run the first backup. It will ask for an encryption password—remember it, as you'll need it to restore.
After the first full backup, subsequent runs are incremental and fast. To restore, open the same app, click Restore, and pick a date.
Command-Line Alternatives: rsync and tar
For users comfortable with the terminal, rsync offers more control. A simple command to back up your home directory to an external drive:
rsync -avh --delete /home/username/ /media/username/BackupDrive/
-apreserves permissions, timestamps, and symlinks.-vshows progress.-hmakes output human-readable.--deleteremoves files on the destination that no longer exist on the source—use with caution.
To create a compressed archive of a folder, use tar:
tar -czvf backup.tar.gz /home/username/Documents
For a full disk image, dd is the low-level tool, but it copies the entire disk block-by-block, which is slow and requires a destination at least as large as the source. Clonezilla is a more practical GUI for this.
Common Problems and How to Solve Them
- Backup fails with "permission denied": Ensure the destination is mounted with write permissions. For external NTFS drives, install
ntfs-3gand check mount options. - Backup takes too long: The first backup is always full; subsequent ones are incremental. If it's still slow, exclude large directories like
~/.cacheand~/.local/share/Trash. - Restore doesn't work: If you encrypted the backup and forgot the password, recovery is impossible. Write it down and store it securely.
- External drive not recognized: Check
dmesgfor errors, and try a different USB port or cable. - Cloud sync deletes files: Always use a dedicated backup tool (like Déjà Dup) for cloud destinations, not a sync client like Dropbox, to avoid accidental deletion propagation.
Costs and Safety Considerations
All the tools mentioned are free and open-source. The main cost is storage: an external 1TB USB drive costs about $50, while cloud storage like Backblaze B2 or Wasabi charges a few dollars per month for 100GB. For maximum safety, follow the 3-2-1 rule: keep 3 copies of your data, on 2 different types of media, with 1 copy off-site. That means a local external drive plus a cloud backup. Also, test your backups regularly—a backup you can't restore is worthless. Try restoring a single file every few months to verify the process works.
Frequently Asked Questions
Is Déjà Dup already installed on Ubuntu?
Yes, Déjà Dup is installed by default in Ubuntu 20.04 and later, accessible via the Backups settings panel. If it's missing, you can install it with sudo apt install deja-dup.
Can I back up to Google Drive or Dropbox?
Yes, Déjà Dup supports Google Drive via GNOME Online Accounts. For Dropbox, you can install the Dropbox client and select the Dropbox folder as a backup destination, but note that Dropbox syncs rather than versions—use Déjà Dup's own backup format for versioning.
What's the difference between a backup and a sync?
A backup creates a separate copy that you can restore from a specific point in time. A sync mirrors changes in real-time, so if you accidentally delete a file, it's deleted everywhere. Always use a backup tool, not a sync client, for data you can't afford to lose.
How do I restore a single file from a Déjà Dup backup?
Open Déjà Dup, click Restore, choose the date, then select the file or folder you want to restore. It will be placed back in its original location, or you can choose a different folder.
Is it safe to back up system files?
You generally don't need to back up system files (like /usr or /etc) because they can be reinstalled. Focus on your home directory. If you want to restore the entire system, use Timeshift or Clonezilla instead.
What if my external drive is NTFS or exFAT?
Déjà Dup can write to NTFS and exFAT drives, but it may not preserve Linux file permissions. For a true backup, format the drive as ext4 (or use a Linux-native filesystem) to retain permissions and ownership. If you must use NTFS, be aware that some metadata will be lost.