Ubuntu sync folders
The parameter -v means verbose, this parameter will print information about the execution of the command, such as the files that are successfully transferred, so we can use this as a way to keep track of the progress of rsync. The parameter -t makes rsync preserve the modification times of the files that it copies from the source folder. The parameter -r means recursive, this is, it will copy the contents of the source folder, as well as the contents of every folder inside it. To copy the contents of one local folder into another, replacing the files in the destination folder, we use: The examples covering the transfer of files between two computers use SSH as the medium of transport, but in a separate post I cover the use of rsync as a daemon. I don't have the RSH daemon running in my computers so you may find me a bit biased about SSH in the examples. But the use of rsync as a daemon for transfers over fast connections, as is usually the case in a local network, is useful. This is the main reason why I favor the use of SSH for my transfers, besides, since SSH is secure, many servers have the SSH daemon available. When we use rsync as a daemon or when we use RSH, the data that is send between computers travels unencrypted, so, if you are transferring files between two computers in the same local network, this is useful, but this shouldn't be used to transfer files over insecure networks, such as the Internet. Additionally to this, the behavior of rsync can be throughly customized, helping us to automatize backups, it can also be run as a daemon to turn the computer into a host and allow rsync clients connect to it.īesides the copying of local files and folders, rsync allow us to copy over SSH (Secure Shell), RSH (Remote Shell) and it can be run as a daemon in a computer and allow other computers to connect to it, when rsync is run as a daemon it listens to the port TCP 873. Rsync counts with a famous delta-transfer algorithm that allows us to transfer new files as well as recent changes to existent files, while ignoring unchanged files. It supports the creation of incremental backups. It can be used as an advanced copying tool, allowing us to copy files both locally and remotely. Rsync is a very versatile copying and backup tool that is included by default in almost every Linux distribution. Running rsync as a daemon (moved to it's own section)
![ubuntu sync folders ubuntu sync folders](https://www.tecmint.com/wp-content/uploads/2017/03/Create-Desktop-Launcher.png)
Transferring files between two remote systems Its use as a daemon when SSH is unavailable was moved to it's own section.ĭealing with whitespace and rare charactersĬompressing the files while transferring them
![ubuntu sync folders ubuntu sync folders](https://www.insynchq.com/blog/content/images/2018/09/linux1.png)
![ubuntu sync folders ubuntu sync folders](https://www.androidgadgematic.com/wp-content/uploads/2012/01/Ubuntu-One-App.jpg)
From the copying and synchronization of local files and folders, to it's use for transfer information among computers. In this post I cover the basics of rsync, in preparation for a subsequent post that will cover backups and it's use in conjunction with cronjobs to automatize the backup process.