Skip to main content
In this lesson, we cover two fundamental Linux backup tools:
  1. rsync for efficient file-level synchronization
  2. dd for creating bit-for-bit disk or partition images
While there are many advanced backup utilities, mastering these native commands ensures you can handle common backup and restore tasks on any Linux system.

Synchronizing Files with rsync

rsync (remote synchronization) efficiently copies and updates files between two locations, either locally or over SSH. It transfers only changes, saving bandwidth and time.

Basic Syntax

Always include a trailing slash on the source directory (source/) to copy its contents rather than the directory itself.

Examples

Sync local → remote:
Sync remote → local:
Sync two local directories:

Creating Disk Images with dd

The dd command performs a low-level copy of a disk or partition, producing an exact image file. This is ideal for full-system backups or forensic duplication.
Before imaging, unmount the target partition or disk to prevent data corruption:

Basic dd Command

Sample Output

Restoring a Disk Image

To write the image back to a disk (this will overwrite the target):
Ensure you specify the correct of= target. Writing to the wrong device can destroy your data.

Next Steps

Continue your journey in Linux file management:
  • Explore advanced tar options for incremental backups
  • Automate backups with cron or systemd timers
  • Integrate encryption with gpg or LUKS for secure archives

Watch Video