Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bor/sync.sh
Simple sync between two(or more) hosts by rsync & ssh
https://github.com/bor/sync.sh
Last synced: 11 days ago
JSON representation
Simple sync between two(or more) hosts by rsync & ssh
- Host: GitHub
- URL: https://github.com/bor/sync.sh
- Owner: bor
- Created: 2010-11-30T15:15:04.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-02-23T12:42:13.000Z (almost 14 years ago)
- Last Synced: 2023-03-11T01:20:11.291Z (almost 2 years ago)
- Language: Shell
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
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 setalso 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 filesee *.rc.example files
KNOW BUGS
* Detect direction not work under FreeBSD (and maybe other *BSD),
because 'stat' has different optionsTIPS & TRICKS
* Use alias (in .bashrc/.bash_profile) like:
alias sync_photo=". /path/to/sync.photo.rc && /path/to/sync.sh"