A practical backup strategy for elementary OS
A dependable backup system on elementary OS should protect two different things: the files you create and the system state that helps you work comfortably. Personal documents, photographs, coursework and accounting records need regular copies, while application settings, browser profiles and desktop preferences are useful when rebuilding a computer. Learn more about A Guide To Elementary Os S Window Tiling And Snap Assist Features.
Deja Dup and Rsync are well suited to these separate jobs. Deja Dup provides a friendly interface for scheduled, encrypted backups, while Rsync gives you precise control over folders, exclusions and an immediately browsable mirror. Used together, they provide convenience for everyday protection and transparency when you need to recover a particular file quickly.
A backup is useful only if it can be restored. That means planning for accidental deletion, a failed SSD, ransomware, theft, an overwritten document and a damaged home directory. Australian users may also need to consider NBN outages, long travel distances to a repair shop, bushfire or flood risks, and the privacy obligations that apply when personal or client information is stored.
| Tool | Best role | Strengths | Important limitation |
|---|---|---|---|
| Deja Dup | Scheduled personal backups | Simple interface, encryption, incremental history | Backups are stored in an archive format rather than as ordinary files |
| Rsync | Folder mirrors and controlled copies | Fast, transparent, scriptable and highly configurable | A mirror can copy deletions unless configured carefully |
| External drive | Local recovery target | Fast restores and no ongoing cloud fee | Can be lost, damaged or connected to malware |
| Remote storage | Off-site protection | Helps with theft, fire and hardware loss | Depends on bandwidth, account security and provider policies |
Decide what needs protection
Start by listing irreplaceable data rather than selecting software first. On a typical elementary OS installation, this includes Documents, Pictures, Videos, Music, Downloads, project folders and any directories used by writing, design or development applications. Hidden folders in your home directory can contain email profiles, SSH keys, application settings and browser data, so they deserve a deliberate decision rather than an automatic exclusion.
Separate data into three groups: files that must be restored, files that can be downloaded again, and files that should never be copied without extra care. Steam libraries, cached installers and large temporary exports often belong in the second group. Password databases, tax records, identity documents and client material belong in the first group, with encryption enabled and access limited.
Think about the cost of losing each category. A student in Melbourne may replace a downloaded Linux ISO in minutes but lose weeks of research if a dissertation folder disappears. A small business in Brisbane may need invoices and customer correspondence for accounting or dispute resolution. If a community organisation manages sensitive case records, its retention and access rules should be documented alongside its case records resources, rather than left to an individual computer.
Use Deja Dup for routine protection
Deja Dup, commonly shown as “Backups” in the application menu, is the easiest starting point for most elementary OS users. Open it from Applications, choose the folders to save, select folders to ignore, and set a schedule. A daily backup is appropriate for active work; a weekly schedule may suit a computer used occasionally. The ideal interval is short enough that the maximum acceptable loss of work is covered.
Choose a destination with enough capacity for several versions. An external USB hard drive is practical for a home office, while a network location or compatible cloud service can provide off-site protection. A 2 TB drive can be affordable through Australian retailers, but capacity estimates should include version history, photographs and video rather than only the current size of your home folder.
Enable encryption and use a strong passphrase that is stored separately from the computer. Deja Dup uses the duplicity system underneath, so its backup is a collection of encrypted, compressed volumes rather than a normal folder you can browse in Files. That design saves space and protects privacy, but it means you should test the restore process before trusting the archive with important material.
Add Rsync for a clear local copy
Rsync is valuable because it can create a readable copy of selected folders. A basic command might be:
rsync -a --delete \
--exclude='.cache/' \
--exclude='Downloads/' \
"$HOME/Documents/" \
"/media/$USER/BackupDrive/Documents/"
The -a option preserves directory structure and useful metadata, while --delete removes destination files that no longer exist at the source. That makes the destination an accurate mirror, but it also makes mistakes dangerous. Run the command first with --dry-run to preview changes, and consider leaving out --delete until you are confident about the source and destination paths.
For a safer archive-style copy, use dated directories or avoid deletion:
rsync -a --info=progress2 \
"$HOME/Pictures/" \
"/media/$USER/BackupDrive/Pictures/"
A mirror is excellent for quickly opening a document from another computer, but it is not a historical backup by itself. If ransomware encrypts the source, Rsync can faithfully copy the encrypted files. Pair the mirror with Deja Dup’s versioned snapshots, or rotate two external drives so that at least one is disconnected and stored elsewhere.
Keep backup destinations secure
An external disk should not remain permanently connected if it contains the only backup. Unplug it after the scheduled job finishes, and store it in a cool, dry place away from the computer. In parts of Australia where summer heat, storms, bushfires or flooding are practical risks, keeping a second copy at another address is more useful than buying a larger single drive.
Off-site storage helps with theft and physical damage, but it introduces account and privacy concerns. Use multi-factor authentication, a unique password and encryption before uploading sensitive files. Check the provider’s location, retention policy and deletion process. The Australian Privacy Act and the Australian Privacy Principles can be relevant when an organisation handles personal information, although individual obligations depend on the situation and the type of data involved.
Treat the backup drive as an untrusted input when it is connected. Keep elementary OS updated, avoid running unknown scripts from copied folders, and scan files if a backup has been attached to a machine with suspicious behaviour. A backup that is always mounted and writable is easier for malware to damage than a disconnected or otherwise protected copy.
Automate Rsync without losing control
Once the manual Rsync command works, automation can remove the temptation to postpone backups. A small script is easier to review than a long command typed from memory:
#!/usr/bin/env bash
set -euo pipefail
SOURCE="$HOME/Documents/"
DEST="/media/$USER/BackupDrive/Documents/"
if [[ -d "$DEST" ]]; then
rsync -a --delete --exclude='.cache/' "$SOURCE" "$DEST"
else
printf '%s\n' "Backup drive is not mounted; nothing copied." >&2
exit 1
fi
Save it somewhere such as ~/bin/backup-documents, make it executable with chmod +x, and test it while watching the destination. A systemd user timer is a clean modern option, but a desktop user who prefers a graphical setup can use Deja Dup for scheduling and reserve Rsync for manual or occasional mirror jobs.
Do not schedule a destructive mirror without an alert or a log. Redirect output to a dated log file, check the exit status, and review the result periodically. If the drive is not mounted, the script should stop rather than accidentally writing to an empty mount-point directory inside the local filesystem. The same caution applies when using a USB drive labelled differently after reconnecting it.
Build a sensible retention pattern
Version history protects against mistakes that a simple mirror cannot. Deja Dup can retain older versions, allowing you to recover a document from before an accidental edit or deletion. Set a retention period that matches your work: several weeks for active personal files, and longer for records that must be retained under organisational or professional policy.
A useful pattern is three layers: the working copy on the computer, a local backup on an external drive, and an off-site or second-drive copy. These do not need to use identical tools. Deja Dup can provide encrypted history on the primary backup disk, while Rsync can maintain a current copy of selected folders for quick access. A second drive can be updated monthly and stored at another location.
Avoid backing up every directory by default. Exclude caches, virtual machine images that are already protected elsewhere, build directories and replaceable downloads when storage is limited. Be cautious with application databases: copying a live database while it is being written may produce an inconsistent result. Close the application first, use its export function, or create a database-aware dump before Rsync copies the result.
Test recovery before it matters
A backup test should answer three questions: can the destination be found, can the files be read, and can the system recover from a realistic failure? Create a temporary restore folder and use Deja Dup’s restore function to retrieve a few files, including one from an older date. Open the restored files and check names, permissions and contents instead of assuming a successful progress bar proves everything.
For an Rsync mirror, compare representative directories and inspect file sizes. The diff command can help with text files, while checksums provide stronger validation for selected binary files:
sha256sum "$HOME/Documents/report.pdf"
sha256sum "/media/$USER/BackupDrive/Documents/report.pdf"
A complete computer replacement is the most valuable rehearsal. Keep a written note of the backup passphrase, destination details, software packages and any special restore steps. If your laptop fails while travelling between Sydney and regional New South Wales, that note may be more useful than relying on memory or a browser bookmark stored on the failed machine.
Desktop customisation is part of recovery too. Record extensions, keyboard shortcuts and application preferences, and keep important configuration files in a deliberate list. For users refining their workflow, an elementary OS window tiling guide can help document the layout and shortcuts worth recreating after a clean installation.
Make the routine sustainable
The best strategy is one that fits ordinary habits. Connect the backup drive after dinner, let Deja Dup run overnight, and use Rsync after a major photo import or project milestone. If your home internet uses a busy NBN connection, schedule off-site uploads outside work hours, but do not confuse a slow upload with a reason to skip the local copy.
Review the arrangement every few months. Check available space, confirm that the encryption passphrase still works, inspect logs and replace ageing drives before failure. A drive that has been used heavily for years should be treated as a consumable rather than a permanent archive. Keep at least one copy protected from accidental deletion and one copy physically separate from the computer.
For most elementary OS users, the practical division is straightforward: Deja Dup handles encrypted, scheduled, versioned backups, while Rsync maintains a carefully selected mirror for fast access and precise control. Keep one backup disconnected when possible, test a restore twice a year, and write down the recovery steps. The reliable routine is simple: automate Deja Dup, run Rsync with a dry run before destructive options, and always maintain a second copy away from the computer.