Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Deja Dup Backup and Restore Guide

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Deja Dup is a simple backup tool for Linux that wraps the powerful rsync and duplicity engines behind a clean GNOME interface. It lets you schedule automatic backups of your home folder to a local drive, external disk, or network location, and restore individual files or your entire system when things go wrong. This guide walks you through setting up your first backup and restoring from it, with practical tips and troubleshooting for common issues.

What You'll Need

  • A Linux distribution with the GNOME desktop (or any desktop where you can install Deja Dup).
  • Deja Dup installed. On Ubuntu or Debian: sudo apt install deja-dup. On Fedora: sudo dnf install deja-dup. On Arch: sudo pacman -S deja-dup. For other distros, check your package manager.
  • A destination for backups: an external USB drive, a second internal drive, a network share (SMB, NFS, SSH), or a cloud service like Google Drive or Nextcloud (if you have the appropriate backend installed).
  • Enough free space on the destination to hold at least one full copy of the data you want to back up.

Step-by-Step

  1. Launch Deja Dup. You can find it in your applications menu under "Backups" or run deja-dup from a terminal.
  2. Set up your storage location. Click the "Storage location" button in the sidebar (or the gear icon, depending on version). Choose where you want your backups saved. For an external drive, select "Local Folder" and pick the mount point (e.g., /media/username/MyDrive). For a network share, select "Network Server" and enter the server address and path. For cloud, select the service and log in when prompted.
  3. Choose what to back up. Click "Folders to save" in the sidebar. By default, Deja Dup backs up your entire home directory. You can remove folders you don't need (like Downloads or Videos) by selecting them and clicking the minus button. Add any other folders you want included by clicking the plus button and navigating to them.
  4. Exclude folders you don't need. Click "Folders to ignore" and add any directories that are large or unnecessary, such as ~/.cache, ~/.local/share/Trash, or virtual machine disk images. This speeds up backups and saves space.
  5. Set a schedule (optional). Click the "Schedule" button (or the clock icon). Toggle "Automatically back up" to on, and choose how often you want backups to run (daily, weekly, etc.) and how long to keep them (forever, 6 months, etc.). Deja Dup will then run in the background at the scheduled times.
  6. Start your first backup. Click the "Back Up Now" button in the top-right corner. Deja Dup will ask for your password to encrypt the backup (if you enabled encryption in settings) and then begin. The first backup is a full backup, so it may take a while depending on the amount of data and speed of your destination.
  7. Monitor the backup. A progress bar appears in the main window. You can continue using your computer; Deja Dup runs in the background. You can close the window and the backup continues.
  8. Verify your backup. After the backup completes, you can check the destination folder to see the backup files (they will be in a folder named after your computer, with subfolders for each backup date). To be extra safe, you can try restoring a test file (see step 9).
  9. Restore a single file or folder. Open Deja Dup, click "Restore" in the sidebar. Select the backup date you want to restore from (usually the most recent). Then choose "Restore specific files" and navigate to the file or folder you need. Select it and click "Restore". You can choose to restore to the original location or to a different folder.
  10. Restore your entire system (or home directory). If you need to restore everything, open Deja Dup, click "Restore", select the backup date, and choose "Restore all files". Deja Dup will overwrite your current home directory with the backup. For a full system restore (including system files), you would need to reinstall the OS first and then restore your home directory from Deja Dup, or use a live USB to run Deja Dup and restore to the mounted system drive.

Common Mistakes

  • Not testing the backup. Many users set up a backup and never check if it works until they need it. Always do a test restore of a small file after your first backup.
  • Backing up to the same drive. If your backup destination is on the same physical drive as your data, a drive failure will wipe out both. Use a separate disk or network location.
  • Ignoring encryption. Deja Dup offers encryption by default. If you choose to encrypt, you must remember the password. Losing it means your backup is unrecoverable.
  • Not excluding caches and large files. Backing up your entire home folder including browser caches and downloaded ISOs can make backups huge and slow. Exclude what you don't need.
  • Assuming backups are continuous. If you don't set a schedule, backups only run when you click "Back Up Now". Make sure you have a schedule or a habit of running backups regularly.

Tips

  • Use a dedicated external drive for backups and label it clearly. Keep it connected when you want to run a backup, and store it safely when not in use.
  • If you're backing up to a network share, make sure the share is mounted before Deja Dup runs. You can use autofs or a systemd mount to automate this.
  • For cloud storage, consider using rclone to mount a remote folder as a local directory, then point Deja Dup to that mount point. This gives you more flexibility than the built-in cloud options.
  • Periodically check the backup log (in ~/.local/share/deja-dup or via the app's "Log" button) to ensure backups are completing without errors.
  • If you have a lot of data, consider using a backup tool that supports incremental backups with deduplication, like BorgBackup or restic, but Deja Dup is fine for most home users.

Troubleshooting

If a backup or restore fails, start with the simplest checks:

  1. Is the destination mounted and writable? Check that your external drive is plugged in and mounted, or that your network share is accessible. You can test by creating a file in the destination folder manually.
  2. Are there permission issues? If you're backing up to a system folder or a network share that requires different credentials, Deja Dup might fail. Try backing up to a folder you own, like a directory in your home folder on an external drive.
  3. Check the log. Deja Dup writes logs to ~/.cache/deja-dup or ~/.local/share/deja-dup (depending on version). Open the log file to see the exact error message. Common errors include "Permission denied" or "No space left on device".
  4. Update Deja Dup. If you're on an older version, there may be bugs. Run sudo apt update && sudo apt upgrade deja-dup (or your distro's equivalent) to get the latest version.
  5. Restart the app. Sometimes a stuck process causes issues. Close Deja Dup completely (check system monitor for any lingering processes) and relaunch.
  6. If restore fails, try restoring to a different location. Instead of restoring to the original path, choose a temporary folder and then copy files manually. This can bypass permission or path issues.

Frequently Asked Questions

Can Deja Dup back up system files?

No, Deja Dup is designed to back up your personal data (home folder). System files are managed by your package manager and are reinstalled with the OS. For a full system image, use tools like Clonezilla or Timeshift.

Where does Deja Dup store its backups?

By default, it stores them in a folder named after your computer in the destination you choose. The structure is a series of files and folders that are not human-readable; you must use Deja Dup to restore them.

How do I restore a backup to a new computer?

Install Deja Dup on the new computer, connect your backup drive or mount the network share, and open Deja Dup. Click "Restore", select the backup location, and then choose the backup date. You can restore all files or select specific ones.

Can I use Deja Dup with an external drive formatted as NTFS?

Yes, Deja Dup works with NTFS drives, but you may need to install the ntfs-3g package to ensure proper read/write support. However, for best compatibility, use ext4 or exFAT.

What happens if I forget the encryption password?

Unfortunately, if you forget the encryption password, your backup is unrecoverable. There is no backdoor. You would need to start a new backup without encryption or with a new password.

Why is my backup taking so long?

The first backup is a full backup, so it takes as long as it takes to copy all your data. Subsequent backups are incremental and much faster. If it's still slow, check your destination speed (USB 2.0 vs 3.0, network speed) and consider excluding large folders you don't need.