Saturday, September 21, 2013

Rsync usage


rsync -varR cara-files/ /media/work/research/coding/cara-files/
rsync  -arv /media/work/research/ -e ssh sukaa@192.168.11.24:/Pdf/back/research/
dry run + delete files that no longer exist. >>
rsync -n -arv --delete  /media/work/research/ -e ssh sukaa@192.168.11.158:/Pdf/back/research/
delete files that no longer exist. >>
rsync -arv --delete  /media/work/research/ -e ssh sukaa@192.168.11.158:/Pdf/back/research/

rsync  -arv /Pdf/back/research/ /work/research/

RSYNC
Local:  rsync [OPTION...] SRC... [DEST]

Access via remote shell:
 Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST]
 Push: rsync [OPTION...] SRC... [USER@]HOST:DEST

Access via rsync daemon:
 Pull: rsync [OPTION...] [USER@]HOST::SRC... [DEST]
    rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST]
 Push: rsync [OPTION...] SRC... [USER@]HOST::DEST
    rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST

Usages with just one SRC arg and no DEST arg will list the source files instead of copying.

OPTIONS SUMMARY
Here is a short summary of the options available in rsync.
Please refer to the FULL List of OPTIONS for a complete description.

What to copy:
-r, --recursive recurse into directories
-R, --relative use relative path names
--exclude=PATTERN exclude files matching PATTERN
--exclude-from=FILE exclude patterns listed in FILE
-I, --ignore-times don't exclude files that match length and time
--size-only only use file size when determining if a file should be transferred
--modify-window=NUM Timestamp window (seconds) for file match (default=0)
--include=PATTERN don't exclude files matching PATTERN
--include-from=FILE don't exclude patterns listed in FILE

How to copy it:
-n, --dry-run show what would have been transferred
-l, --links copy symlinks as symlinks
-L, --copy-links copy the referent of symlinks
--copy-unsafe-links copy links outside the source tree
--safe-links ignore links outside the destination tree
-H, --hard-links preserve hard links
-D, --devices preserve devices (root only)
-g, --group preserve group
-o, --owner preserve owner (root only)
-p, --perms preserve permissions
-t, --times preserve times
-S, --sparse handle sparse files efficiently
-x, --one-file-system don't cross filesystem boundaries
-B, --block-size=SIZE checksum blocking size (default 700)
-e, --rsh=COMMAND specify rsh replacement
--rsync-path=PATH specify path to rsync on the remote machine
--numeric-ids don't map uid/gid values by user/group name
--timeout=TIME set IO timeout in seconds
-W, --whole-file copy whole files, no incremental checks

Destination options:
-a, --archive archive mode
-b, --backup make backups (default ~ suffix)
--backup-dir make backups into this directory
--suffix=SUFFIX override backup suffix
-z, --compress compress file data
-c, --checksum always checksum
-C, --cvs-exclude auto ignore files in the same way CVS does
--existing only update files that already exist
--delete delete files that don't exist on the sending side
--delete-excluded also delete excluded files on the receiving side
--delete-after delete after transferring, not before
--force force deletion of directories even if not empty
--ignore-errors delete even if there are IO errors
--max-delete=NUM don't delete more than NUM files
--log-format=FORMAT log file transfers using specified format
--partial keep partially transferred files
--progress show progress during transfer
-P equivalent to --partial --progress
--stats give some file transfer stats
-T --temp-dir=DIR create temporary files in directory DIR
--compare-dest=DIR also compare destination files relative to DIR
-u, --update update only (don't overwrite newer files)

Misc Others:
--address=ADDRESS bind to the specified address
--blocking-io use blocking IO for the remote shell
--bwlimit=KBPS limit I/O bandwidth, KBytes per second
--config=FILE specify alternate rsyncd.conf file
--daemon run as a rsync daemon
--no-detach do not detach from the parent
--password-file=FILE get password from FILE
--port=PORT specify alternate rsyncd port number
-f, --read-batch=FILE read batch file
-F, --write-batch write batch file
--version print version number
-v, --verbose increase verbosity
-q, --quiet decrease verbosity
-h, --help show this help screen


No comments:

OK GOOGLE on Samsung Galaxy S7 doesn’t work

To make Ok Google detection work on Galaxy S7 (Galaxy series phones) we need to perform a couple of steps. 1. As long as Samsung S vo...