A Linux Resync Tutorial
Users more and more often have multiple computers linked in their home networks. Often, these computers are not just for personal use, but serve as file or back-up servers. Users using Linux operating systems can take advantage of Linux's capabilities to easily back up files from one computer to another. By using "rsync," you can back up files from the current computer to a server in the network, or back up other files onto the current operating computer.
Instructions
-
-
1
Use the "rsync" command to sync files between two computers. You need to provide the directory to sync and the target machine. The following command backs up "test.cpp" to the "home directory on "computer_name." The network computer must have an "ssh" or rsync server running to receive the transfer:
$>rsync test.cpp computer_name:/home
-
2
Transfer the state of the directory in "archive" mode from a networked computer to the local machine. This is effectively the opposite of the previous action, but maintains any links and permissions:
rsync -avz computer_name:/home /data/tmp
-
-
3
Transfer all the files from a directory. This is the same as the previous command, but only transfers the files. Notice the only difference is the "/" after "home":
rsync -avz computer_name:/home/ /data/tmp http://ss64.com/bash/rsync.html
-
1