Skip to content

Instantly share code, notes, and snippets.

@bindiego
Last active August 29, 2015 14:06
Show Gist options
  • Save bindiego/61b6c2ba6e004ca43714 to your computer and use it in GitHub Desktop.
Save bindiego/61b6c2ba6e004ca43714 to your computer and use it in GitHub Desktop.
backup and synchronization
#!/bin/bash
# crontab settings
# 0 3 * * * <path to file>/homedir_bak.sh
rsync -acz /home/wubin /data/backup/wubin_home > /dev/null 2>&1 &
#!/bin/bash -ex
#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
rsync -acvz wubin@asof.eja.hk:/var/www/html/asof/* .
#!/bin/bash -ex
tar czf - r2 r2.cn/ r2.edanzediting.com/ | ssh -p 2323 wubin@192.168.0.113 'tar xzf - -C /home/wubin/workspace/tmp/gitplay'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment