pushme: Tool to synchronize directories with rsync, zfs or git-annex

[ bsd3, program, system ] [ Propose Tags ]

Script I use for synchronizing data among machines.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.2.0, 1.0.0, 1.0.1, 1.1.0, 1.4.0, 1.5.0, 2.0.1, 2.0.2, 2.1.1, 2.1.3
Dependencies aeson, base (>=4.7 && <5.0), bytestring (>=0.10 && <0.11), containers (>=0.5 && <0.6), foldl, io-storage (>=0.3 && <0.4), lens (>=4.9 && <5.0), logging (>=3.0 && <3.1), monad-logger (>=0.3 && <0.4), old-locale (>=1.0 && <1.1), optparse-applicative (>=0.10 && <1.0), parallel-io (>=0.3 && <0.4), pipes, pipes-group, pipes-safe, pipes-text, regex-posix (>=0.95 && <1.0), safe (>=0.3 && <0.4), shelly (>=1.6 && <2.0), system-fileio (>=0.3 && <0.4), system-filepath (>=0.4 && <0.5), temporary (>=1.2 && <2.0), text (>=1.2 && <1.3), text-format (>=0.3 && <0.4), time (>=1.4 && <2.0), transformers (>=0.3 && <0.6), unix (>=2.6 && <2.8), unordered-containers (>=0.2 && <0.3), yaml [details]
License BSD-3-Clause
Author John Wiegley
Maintainer johnw@newartisans.com
Category System
Home page https://github.com/jwiegley/pushme#readme
Bug tracker https://github.com/jwiegley/pushme/issues
Source repo head: git clone https://github.com/jwiegley/pushme
Uploaded by JohnWiegley at 2018-07-23T17:21:32Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables pushme
Downloads 6820 total (29 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2018-07-23 [all 3 reports]

Readme for pushme-2.1.3

[back to package description]

This is the script I use for synchronizing data between my machines (and also to directories on the same machine, externally connected drives, and to and between ZFS filesystems).

Each "fileset" you wish to synchronize is defined in a YAML file within ~/.pushme/conf.d, for example this recipe I use for synchronizing my

Name:     'Desktop'
Priority: 12
Class:    'quick,main,sync'

Stores:
  hermes:
    Path: /Users/johnw/Desktop
  
  maia:
    Path: /Users/johnw/Desktop
  
  vulcan:
    Path: /Users/johnw/Desktop
  
Options:
  Rsync:
    Filters:
      - '- /annex/'

Filters may also be specified for a specific computer only:

Name:     'Desktop'
Priority: 12
Class:    'quick,main,sync'

Stores:
  hermes:
    Rsync:
      Path: /tank/Archives
      Filters:
        - '- /annex/'
  
  maia:
    Path: /Users/johnw/Desktop
  
  vulcan:
    Path: /Users/johnw/Desktop

There are three backends supported for file transfer Rsync (the default, if none is specified), Zfs, and Annex. When two backends mismatch for a given machine, Rsync is used, otherwise the most optimal method for synchronizing that particular fileset type is attempted.

Note that recently I have only been using the Rsync method, so the other backends are not well tested, and should not be used except on trial data at this time. If you wish to help support them, I am available for assistance.

Pushme is invoked as follows (--from can be omitted, if hostname returns the same string):

pushme --from thisMachine thatMachine

This command will synchronize every fileset that contains a backend definition for both thisMachine and thatMachine. Here is example output from such a command, assuming two filesets home and local:

foo $ pushme thatMachine
15:18:44 - [NOTICE] Synchronizing ThisMachine -> ThatMachine
15:18:44 - [NOTICE] Sending ThisMachine/home → ThatMachine
15:18:52 - [NOTICE] Sent 151.0M in 131 files (out of 1.37G in 12,418)
15:20:26 - [NOTICE] Sending ThisMachine/local → ThatMachine
15:21:02 - [NOTICE] Sent 0b in 0 files (out of 6.45G in 207,453)

Some common options include:

$ pushme -c quick bar       # only sync filesets with the "quick" class
$ pushme -f home bar        # only sync the "home" fileset
$ pushme -n bar             # don't do anything, just scan
$ pushme -N bar             # don't even scan
$ pushme -v bar             # show commands being executed
$ pushme -D bar             # show more info than you want to see