// Networking & Security

Back up files with rsync

Preview a copy, then make a repeatable local backup.

A backup should be restorable. Start with a simple copy to a mounted external drive or a second disk, and verify the result.

Identify the target

lsblk -f

Find where your backup drive is actually mounted. The path below is a placeholder: replace it with your real backup directory.

Dry run first

rsync -avh --dry-run "$HOME/Documents/" "/path/to/backup/Documents/"

The trailing slash on Documents/ means copy its contents. --dry-run shows what would be copied without changing the destination.

Run when satisfied

rsync -avh "$HOME/Documents/" "/path/to/backup/Documents/"

Do not use --delete until you fully understand how it removes destination files. Keep an offline or disconnected backup when possible.

Check your results

find "/path/to/backup/Documents" -type f | head

Replace the example path. Open a few backed-up files, not just the folder listing.

The 3-2-1 idea

For precious data, aim for multiple copies, on different media, with at least one separate from your main computer. This page demonstrates a first step, not a complete disaster-recovery plan.

Useful official references