Results 1 to 4 of 4
Thread: RSYNC Help
-
03-13-2012, 04:30 PM #1Web Hosting Master
- Join Date
- Mar 2004
- Location
- Los Angeles, California
- Posts
- 979
RSYNC Help
If you issue a rsync command say
rsynch -avz /directory1/subdirectory1/ /directory2/
Say for example you wanted to copy the content of directory 1 to directory 2 but you reverse the source and destination so instead of copying directory1 subdirectory 1 you copied directory2 to directory1 subdirectory 1 would that overwrite the files or if there were existing matching subdirectories would it erase files?
Basically is rsync in a sense volatile where it'll delete and remove stuff, or does it just make sure both directories have the same items. How does it know if a file was deleted or just not sycned?
-
03-13-2012, 04:39 PM #2Newbie
- Join Date
- Feb 2012
- Posts
- 15
Rsync with the flags you mentioned (-avz) will not delete any files, but it might overwrite them if duplicate names exist in each directory. Rsync will only delete files in the destination if you specify one of the various --delete options.
eEnvo Web & VPS Hosting
www.eenvo.com
-
03-13-2012, 04:57 PM #3Aspiring Evangelist
- Join Date
- Aug 2010
- Location
- Prague, Czech Republic
- Posts
- 404
By the way, you could use --dry-run key.
█ Supportex.Net server management, full range of services. EU-based outsourced company. Since 1998.
█ Outstanding quality for high performance projects; clustering and high-availability solutions, DDoS protection.
█ Cisco/Juniper network management & deployment assistance. Network design and monitoring.
-
03-14-2012, 01:42 AM #4Web Hosting Master
- Join Date
- May 2005
- Posts
- 1,141
by default, rsync checks for file validity in filesize and modified date. It will use a mix of crc and rolling checksum if you add the checksum flag.
So, if you do dirX -> dirY, it will replace any files where it's "different" and write files that doesn't exist. It will not delete any unless you add the delete flag (--delete).I have no sig to spam.
Similar Threads
-
Remote Rsync Backup accounts - FTP/SSH/SFTP/RSYNC - 50% Off First Two Months
By Jamesc in forum Backup ServicesReplies: 0Last Post: 10-19-2011, 11:16 AM -
[Rsync Palace] Remote Rsync Backups.
By -OY- in forum Other Hosting OffersReplies: 8Last Post: 12-26-2007, 11:31 PM -
[Rsync Palace] Remote Rsync Backups.
By -OY- in forum Other Hosting OffersReplies: 6Last Post: 11-25-2007, 06:13 PM -
Rsync - $0.0674/GB - Last week - [Rsync Palace]
By -OY- in forum Other Hosting OffersReplies: 6Last Post: 07-15-2007, 03:56 PM -
Double more space - Rsync Palace - Rsync Backups - $4.95/mo.
By -OY- in forum Other Hosting OffersReplies: 38Last Post: 05-18-2007, 10:34 AM