

Sent 160 bytes received 50 bytes 420.00 bytes/sec See what has been created ( before rsync): $ ls local/ remote/Ĭalling rsync: $ rsync -avh -delete local/ remote/ When you are happy, remove it.Ĭreate 2 directories $ mkdir local/ remote/Ĭreate files in them $ touch local/local_only remote/remote_only local/exists_locally_and_remotely remote/exists_locally_and_remotely` Always use this flag initially to prevent data loss.
#UNINSTALL GRSYNC TRIAL#
-n dry run, perform a trial run with no changes made.-h output numbers in a human-readable format.files removed from remote are restored from local if they exist, else ignored.files removed from local are removed from remote.files added in local are added to remote.That means it takes care to synchronize local and remote such that Takes care to always sync back changes done locally to the remote. The command $ rsync -avhn -delete local/ remote/ rm for deletion files for period of time or size of files: rsync SOURCE TARGETįind TARGET -maxdepth 1 -type f -mtime +60 -exec rm -f implement just in TARGET.

I suggest you to use rsync for make backup from source files and use find. So if any file or folder added in source, it'll be synced to target without any deletion. The rsync command wont delete any file while you use some of its options delete in that command.
#UNINSTALL GRSYNC MANUAL#
I see some options listed in the manual page for rsync that might do the trick, but since I'm not familiar with.

Want the destination folder to perfectly reflect the source folder,Īnd that means deleting any files that have been deleted from the source If that is the case, what is the best way to make rsync do this? I That were deleted from the source folder? Have been changed in the source folder but NOT delete files That have been added to the source folder and change files that So I have a couple of questions:īy default, does rsync only add files to the destination folder The backup plugin eventually did its job and deleted the older backups, so I was expecting the rsync cron task to subsequently delete the older backups from my Dropbox folder to match the source folder, but it has not done so. I also established a cron task to automatically copy those backups to my Dropbox folder every night using rsync with the -a option.Īfter a few months my Dropbox account reached its storage limit and I realized I would not be able to keep so many backups, so I configured the game server backup plugin to not retain so many backups, then waited a few days to see if it would delete the older backups as it is scheduled to do on a weekly basis. I installed a backup plugin for each game server that creates frequent backups of game world files in a particular folder on the machine. I recently set up a machine with Ubuntu Server to host game servers.
