Home > sync.sh

sync.sh

Sync.sh is a project mainly written in Shell, it's free.

Simple sync between two(or more) hosts by rsync & ssh

sync.sh

Simple sync between two(or more) hosts by rsync & ssh. Using timestamp file for detect direction.

USAGE

. sync.rc && ./sync.sh [direction] or source sync.rc && ./sync.sh [direction]

where direction - in or out, force direction if set

also this script need setup some vars in rc file required: SYNC_USER - username SYNC_SERVER - hostname or ip DIR_LOCAL - local dir DIR_REMOTE - remote dir on server RSYNC_FLAGS - rsync options and optional: SYNC_MAKE_LS_R - set defined if you want generate ls-R file

see *.rc.example files

KNOW BUGS

  • Detect direction not work under FreeBSD (and maybe other *BSD), because 'stat' has different options

TIPS & TRICKS

  • Use alias (in .bashrc/.bash_profile) like: alias sync_photo=". /path/to/sync.photo.rc && /path/to/sync.sh"
Previous:e-cafe