Skip to main content

BACKUP & RESTORE SCRIPTS

Backup or restore all user profiles on a host.

USAGE

usage: pyrap [-h] (-b | -r) [-u] [-x] [-v | -q] url

Backup or restore users to an rsync server.

positional arguments:
  url             A valid rsync url.

optional arguments:
  -h, --help      show this help message and exit
  -b, --backup    Backup users to rsync server or path.
  -r, --restore   Restore users on from last backup.
  -u, --users     Automate user selection.
  -x, --excludes  Automate excludes selection.
  -v, --verbose   Increase output verbosity.
  -q, --quiet     Run silently.

ARGUMENTS

[URL]

Takes an rsync url as an argument:

rsync://user@host:port/path/to/PARENT/of/Users

Or alternatively, any mountpoint will work:

/Volumes/Backups

PITFALLS & CAVEATS

THE PATH ON THE REMOTE HOST MUST POINT TO PARENT OF USERS, NOT USERS!

Once mounted the mountpoint should contain the Users directory underneath it.

The script backups to or restores from the following directory layout underneath the mountpoint:

/mountpoint/Users/user.name/date

And logs to:

/mountpoint/Logs/CopyType/user.name/date.log

Where CopyType equals either Backup or Restore.

If this layout does not exist it will be created under the mountpoint.

User, group and permissions will be retained and each backup will be hard-linked against the last to save space and mimic the functionality of Time Machine.

https://blog.interlinked.org/tutorials/rsync_time_machine.html

It's also worth pointing out that for the time being preserving extended attributes is not supported.

EXAMPLES

To backup from /Users to a rsync server, without prompting for each user:

pyrap -bu rsync://user@host:port/backups

To restore from /Users to a rsync server, with increased verbosity:

pyrap -rv rsync://user@host:port/backups

Metadata

Release files for pyrap 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrap 0.0.5
File Size Uploaded
pyrap-0.0.5.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyrap 0.0.5
File Interpreter ABI Platform
pyrap-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / pyrap-0.0.5.tar.gz

Download URL pyrap-0.0.5.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
38b7141a53ea1cd0fa1dba41773b7671036ec6240e82c3f930d932123ba22290
BLAKE2b-256 checksum
How to use checksums
4a8884a6eb2d91146e23c1bd52d1dcd65d2cf838f04f2466c47577b6f8063574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyrap-0.0.5-py3-none-any.whl

Download URL pyrap-0.0.5-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8623e0296a1052dfe4e80449bd3539a83184d5d0d4dc046d6afea6d32b4a10bd
BLAKE2b-256 checksum
How to use checksums
0c011000f4bdcd175d628651ee9c95467a9a8f7cffff2f3e878327a10186b546
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page