Page 1 of 1

Sync 2 Folders

Posted: 29 Aug 2016, 02:07
by FURRY_NOVA
Is there a module GUI application or a terminal command to sync 2 folders of their content to match the first one? I tend to do a lot of file managing (renaming, moving, adding and deleting) while keeping one as a backup on another device.

I'm asking since it's difficult having 2 Thunar tabs/windows open and performing a lot of same changes on both devices. Doing a full delete of the secondary folder and a full copy to replace isn't healthy for the USB devices I imagine specially greater than 10gb. So I imagine it's better having a function to read and compare files to write changes.

Basically what is in the master folder is on the secondary, what isn't in the master folder isn't on the secondary and both file versions are the same.

If it's a terminal command, for safety, something to print a list of changes before performing the actions would be great.

Re: Sync 2 Folders

Posted: 29 Aug 2016, 03:03
by brokenman
rsync was designed for this. A quick duckduckgo search will bring up loads of tutorials. For a gui use USM to download grsync.

Re: Sync 2 Folders

Posted: 29 Aug 2016, 21:29
by FURRY_NOVA
Edit: I managed to solve the issue. I used this in the terminal and it updated everything in seconds.

Code: Select all

rsync --progress --modify-window=1 --update --delete --recursive --times "/mnt/sdb1/source folder/" "/mnt/sdc/destination folder/"
Although grsync which I was using was the overall problem. The perimeters are the same and it hangs overwriting everything with same settings for ages.