Command to synchronize two folders and their subfolders locally or remotely

Many times, when we have to make a backup, the need arises to synchronize two folders. If you have tried to do this test with window programs or simply by copying the starting folder with the destination folder, you will have realized that it takes a long time. There is a also scheduleable command,which can be used to synchronize files and folders drastically reducing waiting times. This command is called rsynccode> and is available under both linux and under windows. So, after making the appropriate backups,at least until you think you have mastered the command, you can also set some sort of schedule. Always keep in mind that folder and file permissions must be adequate. To give an example about the use let’s say we have two folders, the first one that is the starting folder that has inside it everything we want to sync that we will call ALFA and the second, which is the destination folder where we hope to find all the updated files contained in ALFA if the command is successful, we’ll call it BETA. Then after installing correctly rsynccode> on windows or on linux run the following command:

rsync -avz /ALFA/ /BETA/

If everything went well, as if by magic you will see the files that are recognized and synchronized from one path to another. Keep in mind that the path of the starting and destination folders must be complete and therefore there must also be an understanding of the folder structure of your system. Feel free to leave a comment if you have any concerns and I will respond to you as soon as possible.

It's possible to leave a comment as registered users to the site, accessing through social, wordpress account or as anonymous users. If you want to leave a comment as an anonymous user you will be notified by email of a possible response only if you enter the email address (optional). The insertion of any data in the comment fields is totally optional. Whoever decides to insert any data accepts the treatment of these last ones for the inherent purposes of the service that is the answer to the comment and the strictly necessary communications.

Leave a Reply