An ad-free and cookie-free website.
Learn to securely backup file systems at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux rsync Command Summary with Examples (3:24)
Our seventy-fourth word, or command to memorize is
rsync from our category
rsync allows you to synchronize
(backup) file systems.
||Print help screen|
||Use file archive|
||Print verbose messages|
Recall from the last block of six videos, we've been compressing files and making archives, now we'll create backups of those archives, often called mirrors, on other disk drives, and we could even do it remotely (ie, online backup).
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
rsync command has
over 50 options and the arguments include the source
followed by the destination.
Like most commands, help is available with double-dash
-a creates an archive, meaning
sub-directories too. And
with other commands, gives a progress report.
So why is
rsync an important command?
rsync not only saves time when
making backups versus plain copying, but also syncs only updated files,
saving bandwidth, plus it can also be scheduled and automated.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. Because this is normally an administrator function, with
just show the basics. Let's do a directory listing.
If you haven't been with us from the start, we have been busy.
So, now we'll back this up, and in the home directory create a target which imagine could be on another file system remotely (through ssh for example) and call it, cleverly, backup.
Next, let's do an
-av, the source
../linux, like this, and the
../backup, like this, and
it'll put a backup of the whole directory of files.
And then last, let's verify with an
on the directory
make sure everything showed up.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
command. So just like the feeling of (backup) safety on Windows, or Time
Machine on Mac, it's nice to know data is safe and
rsync provides that for you.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
If you love learning like we do here, then please consider giving back in some way that works for you. Follow, subscribe, contribute, join.
tarcommand, hit Back.
chmod, click Next.
A newly-updated free resource. Connect and refer a friend today.