A encapsulation of rsync command for routine backup.
- Run
git clone https://github.com/d0u9/tri-sync
. - Create a configuration file at
~/.tri_sync.json
or at~/.dot/.tri_config.json
. Fill it with the following contents:
{
"Applications": {
"tri-sync": {
"profile1": {
"server": "XXX.XXX.XXX.XXX",
"name": "Your username",
"local": "The fold you want to sync",
"rmote": "The remote sync path on the remote host"
},
"profile2": {
"server": "XXX.XXX.XXX.XXX",
"name": "Your username",
"local": "The fold you want to sync",
"rmote": "The remote sync path on the remote host"
}
}
}
}
- Replace the
server
,name
,local
,rmote
fields as yours.
Sync local to remote using profile1:
tri-sync profile1
Sync local to remote using profile1, and delete extraneous files from dest dirs:
tri-sync profile1 out -d
Sync remote to local:
tri-sync profile1 in
Sync remote to local and delete extraneous files from dest dirs:
tri-sync profile1 in -d