Learn how to backup and restore data on Linux systems using tools like tar, rsync, dd, and rclone. Step-by-step instructions for local and cloud backups.
tar
, rsync
, dd
, and cloud services such as Google Drive and Amazon S3. The guide covers both the backup and restore procedures for each tool.
tar
tar
command. It allows you to easily compress files and store them in an archive.
/home/user/data
), use the following command:-c
: Create a new archive.-v
: Show detailed operations.-p
: Preserve file permissions.-z
: Compress using gzip.-f
: Specify the archive file name.tar
.tar.gz
archive file, use the following command:
-x
: Extract files from the archive.-v
: Show extraction details.-p
: Preserve permissions.-z
: Decompress with gzip.-C
: Specify the destination directory for extraction.rsync
rsync
is another useful tool for backups, allowing you to synchronize data between directories, or even between servers.
-a
: Archive mode, preserves file attributes like permissions and timestamps.-v
: Show detailed progress.-z
: Compress data for faster transfer.rsync
rsync
, use the same command structure.
dd
dd
tool is used for making complete backups of disks or partitions (for example, for backing up an operating system or a specific partition).
if
: Input file (the source disk or partition).of
: Output file (backup destination).bs
: Block size (in this case, 64K).dd
dd
, use the following command:
rclone
rclone
tool allows you to back up and restore data to/from these services.