Results 1 to 4 of 4

Thread: RSYNC Help

  1. #1
    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?
    ••• Edrick Smith •••
    ••• C47 Hosting LLC | Media Centric High Demand Web Services •••

  2. #2
    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

  3. #3
    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.

  4. #4
    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

  1. Replies: 0
    Last Post: 10-19-2011, 11:16 AM
  2. [Rsync Palace] Remote Rsync Backups.
    By -OY- in forum Other Hosting Offers
    Replies: 8
    Last Post: 12-26-2007, 11:31 PM
  3. [Rsync Palace] Remote Rsync Backups.
    By -OY- in forum Other Hosting Offers
    Replies: 6
    Last Post: 11-25-2007, 06:13 PM
  4. Rsync - $0.0674/GB - Last week - [Rsync Palace]
    By -OY- in forum Other Hosting Offers
    Replies: 6
    Last Post: 07-15-2007, 03:56 PM
  5. Double more space - Rsync Palace - Rsync Backups - $4.95/mo.
    By -OY- in forum Other Hosting Offers
    Replies: 38
    Last Post: 05-18-2007, 10:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •