Skip to content

Python script for rsync shorthand, i.e. for backups & frequent remote copying.

Notifications You must be signed in to change notification settings

Deconstrained/MySync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

mysync.py

Python script for shortening rsync commands that are used frequently enough to be an annoyance. A lazy rsync, if you will.

Use

mysync.py [target] [location] [direction] [behavior] [additional rsync flags]

The target and location arguments are shorthand aliases defined in the configuration file (which will be created from a template the first time that the script is run). See that file for instructions on how to set it up, or the original blog post I wrote on it.

[target]
A path that exists both in the current location (i.e. the machine on which the script is being run) and at somewhere else, i.e. an external volume or remote host.
[location]
A "container" for targets, i.e. volume or host.
[direction]
Pull or push; pull updates the local copy according to content on the remote, push is vice versa.
[behavior]
Any of the following keywords (or part of one of them that uniquely matches one of them):
ccc
Flags -c --delete-after; Makes the target a 100% carbon copy of the source, using checksum difference as the criterium for transferring rather than timestamp
clean
Flags --delete-after --ignore-existing --existing; only deletes files in the target that are not in the source, and do nothing else (remove deleted files).
copynew
Flags --ignore-existing; Skip files that exist already in target, copy new files.
fullupdate
Flags -u; Update all files on the target, skip files that have been touched more recently on the source, and copy new files.
update
Flags -u --existing; Update files that exist in both target and source such that the source copy is newer, but don't copy new files from the source.
verbatim
Flags --delete-after; Make the target a 100% carbon copy of the source, using difference in file size or timestamp as the criterium for transferring.

License

http://www.gnu.org/copyleft/gpl.html

About

Python script for rsync shorthand, i.e. for backups & frequent remote copying.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages