To back up your files on Ubuntu 26.04, plug in an external drive, open the Backups app (Déjà Dup), choose the drive as the storage location and click Back Up Now. From the terminal, rsync copies your home folder to the drive in one command.
Below: how to set up automatic backups, restore a file or a whole folder, back up with rsync or tar, and take a Timeshift snapshot of the system before an upgrade. If a step does not work on your machine, leave a comment or contact us and we will help.
You need an external drive with more free space than your home folder uses. Open a terminal with Ctrl + Alt + T for the commands.
1
Plug in the drive and open Backups
Plug in the drive, then open Backups from the app grid. If it is not there, install it:
Install the Backups app
sudo apt install deja-dup
To see how much space your files need:
Show the size of your home folder
du -sh ~
mike@ubuntu:~$ du -sh ~
38G /home/mike
2
Choose what to back up
Backups saves your whole home folder by default, except Trash and Downloads. Caches such as ~/.cache are always skipped.
To change that, open the app’s Preferences. Add folders under Folders to Back Up, and put large folders you can download again, such as a games library, under Folders to Ignore.
3
Pick the drive and set a password
Under Storage Location, choose your external drive. It shows in the list while it is plugged in. Do not pick a folder on the same disk as Ubuntu: if that disk fails, you lose the files and the backup together.
Backups encrypts everything and asks for a password. Save it in a password manager or write it down. Without it, the backup cannot be restored.
4
Back up now, then turn on automatic backups
Click Back Up Now. The first backup takes the longest. Later ones only copy what changed.
Then turn on Back Up Automatically in Preferences and choose how often. Backups run at night when they can. Keep the drive plugged in, or plug it in on a routine, so scheduled backups have somewhere to go.
Restore Files From a Backup
Get back a file or a folder
Plug in the drive, open Backups and click Browse Backups. Pick a date. A file manager window opens showing your files as they were that day.
Drag what you need back into your home folder. Open a file first if you want to check it is the right version.
Restore everything on a new install
Install Backups as in step 1 and plug in the drive. Open the app and click Restore From a Previous Backup. Choose the drive as the Backup location, click Search, enter your password and pick a date.
Select everything in the window that opens and drag it into your home folder.
Which Backup Method to Use
Use the Backups app for your files and Timeshift for the system. The terminal tools suit people who want plain copies they control.
Method
Best for
How you restore
Backups app
Automatic, encrypted backups of your files
Picking a date and dragging files back
rsync
A plain copy you can open on any computer
Copying the files back
tar
One archive of a few folders to keep or send
Extracting the archive
Timeshift
System files, before an upgrade or a driver change
Choosing a snapshot
A backup made with the Backups app is a locked, encrypted store, not a folder of normal files. You can only read it through the app. If you want files you can open anywhere, use rsync.
Back Up Your Home Folder With rsync
rsync copies your files to the drive as normal files and folders. Run it again later and it only copies what changed.
1
Find the drive
Ubuntu mounts external drives under your name in /media:
List mounted drives
ls /media/$USER
mike@ubuntu:~$ ls /media/$USER
BackupDrive
Use your drive’s name in place of BackupDrive below.
2
Copy your home folder
Back up your home folder
rsync -a --exclude='.cache' ~/ /media/$USER/BackupDrive/home-backup/
-a keeps dates and permissions. The slash after ~/ matters: it copies what is inside your home folder. Leave it off and rsync puts an extra folder named after you inside home-backup.
To also remove files from the backup that you deleted at home, add --delete. Run it with --dry-run first, which lists what would change without changing anything:
Preview a mirror backup
rsync -a --delete --dry-run --verbose --exclude='.cache' ~/ /media/$USER/BackupDrive/home-backup/
If the list looks right, run it again without --dry-run.
3
Restore from the copy
Copy a folder back the same way, with the paths swapped:
Restore your Documents folder
rsync -a /media/$USER/BackupDrive/home-backup/Documents/ ~/Documents/
Or open the drive in Files and copy them back by hand. They are ordinary files.
Make a Compressed Archive With tar
tar packs folders into one file. It suits a one-off copy you want to store or send, not a regular backup.
Archive Documents and Pictures
tar -czf ~/backup-$(date +%F).tar.gz -C ~ Documents Pictures
-c creates the archive, -z compresses it, -f names the file, and -C ~ stores the folders without /home/mike in front. The date in the name keeps each archive separate.
List what is inside
tar -tf ~/backup-2026-10-11.tar.gz
Extract into a test folder
mkdir -p ~/restore-test
tar -xf ~/backup-2026-10-11.tar.gz -C ~/restore-test
Use your archive’s file name. Extract into a separate folder first, so old files cannot overwrite newer ones. More options are in our tar command cheat sheet.
Snapshot the System With Timeshift
Timeshift saves Ubuntu’s system files, not your documents. Take a snapshot before an upgrade or a driver change, and roll back if it goes wrong.
Install Timeshift
sudo apt install timeshift
Open Timeshift from the app grid once to set it up. Choose RSYNC as the snapshot type, which works on any disk, and pick where to keep snapshots. After that you can take one from the terminal:
To roll back, open Timeshift, pick the snapshot and click Restore, or run sudo timeshift --restore. Timeshift leaves your home folder out by default, so keep using the Backups app or rsync for your files. Taking a snapshot is step one in our Ubuntu 26.04 upgrade guide.
If Something Goes Wrong
Fix
The drive does not show in Backups
Open the drive once in Files so Ubuntu mounts it, then check Storage Location again. If ls /media/$USER does not list it either, the drive is not mounted or not connected.
Fix
You lost the backup password
The password cannot be reset or recovered, and the backup cannot be opened without it. Start a new backup with a new password, and keep the old drive until the new backup has finished.
Fix
rsync says Permission denied
Some files in your home folder belong to root, usually because an app was run with sudo. Give them back to your user, then run rsync again:
Make your user own your home folder
sudo chown -R $USER:$USER ~
Fix
The drive is full
The Backups app deletes the oldest backups when space runs low, unless Keep Backups stops it. For rsync, add an --exclude for each large folder you do not need, such as --exclude='Videos', or use a bigger drive.
Helpful Resources
Déjà Dup help ↗The Backups app’s own guide to backing up and restoring
Timeshift ↗Project page, with the settings explained
rsync manual ↗Every rsync option, including –exclude and –delete
r/Ubuntu ↗Ask about your backup setup and see what worked for others
Frequently Asked Questions
What is the easiest way to back up Ubuntu?
Use the Backups app. Plug in an external drive, choose it as the storage location, set a password and click Back Up Now. Then turn on Back Up Automatically so it keeps running.
Does Ubuntu back up my files automatically?
Not until you set it up. Open Backups, choose a storage location, and turn on Back Up Automatically in Preferences.
How do I back up Ubuntu to an external drive?
Choose the drive as the storage location in the Backups app, or copy your home folder to it with rsync -a ~/ /media/$USER/BackupDrive/home-backup/ using your drive name.
Does Timeshift back up my personal files?
No. By default Timeshift only saves system files, so it can undo a bad update or driver change. Back up your files with the Backups app or rsync.
Can I open a Backups app backup without the app?
No. The backup is stored encrypted, so you restore it through the Backups app with your password. If you want plain files you can open anywhere, use rsync.
How do I restore files from a backup on Ubuntu?
Open Backups, click Browse Backups and pick a date. A file manager window opens, and you drag the files you need back into your home folder.
Backups running?
Finish setting up Ubuntu
Updates, codecs, drivers and the settings worth changing on a new Ubuntu 26.04 install.