Rsync Wrapper to Backup/Restore all Users.
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyrap-0.0.5.tar.gz
.
File metadata
- Download URL: pyrap-0.0.5.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38b7141a53ea1cd0fa1dba41773b7671036ec6240e82c3f930d932123ba22290 |
|
MD5 | baef5f9436ce314ea2f2c8ea5f35769f |
|
BLAKE2b-256 | 4a8884a6eb2d91146e23c1bd52d1dcd65d2cf838f04f2466c47577b6f8063574 |
File details
Details for the file pyrap-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: pyrap-0.0.5-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8623e0296a1052dfe4e80449bd3539a83184d5d0d4dc046d6afea6d32b4a10bd |
|
MD5 | 705961931d0b4807c50faa87611c3ed9 |
|
BLAKE2b-256 | 0c011000f4bdcd175d628651ee9c95467a9a8f7cffff2f3e878327a10186b546 |