User Tools

Site Tools


eric:computer:bash:commands:rsync:rsync.command

Title: rsync.command
Created: 2013-11-15 00:28:04
Metadata: gpslongitude=-95.652719,gpslatitude=32.520891

rsync command


Rsync is installed in /usr/local/bin/rsync or on newer Macs in /opt/homebrew/Cellar/rsync/VERSION/bin/rsync

-v, --verbose               increase verbosity
-a, --archive               archive mode; same as -rlptgoD (no -H)
-r, --recursive             recurse into directories
-l, --links                 copy symlinks as symlinks
-p, --perms                 preserve permissions
-t, --times                 preserve times
-g, --group                 preserve group
-o, --owner                 preserve owner (super-user only)
-D                          same as --devices --specials
-z, --compress              compress file data during the transfer
    --delete                delete extraneous files from dest dirs
    --progress              show progress during transfer
-n, --dry-run               perform a trial run with no changes made
--list-only                 list the files instead of copying them
-b  --backup                used with --backup-dir to save existing files that have changed
--backup-dir=[path]         used with -b or --backup to tell where to save existing files
    --exclude=PATTERN       exclude files matching PATTERN
    --delete-excluded       delete excluded files
    --safe-links            ignore symlinks outside of current tree

Be careful of the last “/” in source and destination paths.

Examples:

/usr/local/bin/rsync -va --delete --progress --stats [source] [destination] ; date
/usr/local/bin/rsync -vab --backup-dir=[archive folder path] [source] [destination] ; date
rsync -va ./koha_koha.sql ericswanson@192.168.0.119:/home/ericswanson/koha_koha.sql
/usr/local/bin/rsync -va --delete --progress --stats --safe-links --delete-excluded --exclude=.cache --exclude=.mozilla ~/ /media/ericswanson/Eric-250GB/Eric_Swanson/Yttrium 2>~/rsync-error-log.txt
eric/computer/bash/commands/rsync/rsync.command.txt · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki