script for partial incremental backups intended for backing up Android phones
| .gitignore | ||
| backup-phone.py | ||
| LICENSE | ||
| README.md | ||
backup-phone
backup-phone.py manages incremental backups of a subset of the
directories on a device. It maintains a configuration file config.json
describing what should be backed up in the root of the directory where
the backups are stored. The basic usage is:
cd /path/to/backups/
backup-phone.py --config /mountpoint/of/device/to/backup/
# Edit config file.
gvim config.json
# Rerun with --config until the config file is settled.
backup-phone.py --config /mountpoint/of/device/to/backup/
# Run in DRY RUN mode to confirm behavior.
backup-phone.py --dry-run /mountpoint/of/device/to/backup/
# Do an actual backup.
backup-phone.py /mountpoint/of/device/to/backup/
Backups are in directories named after the day (e.g., 2023-04-29) by
default, but the "backup_dir_strftime" option in config.json can be
used to customize that.
The structure of the config file mirrors the directory structure of the
device. Each time --config is run, it will unfold another level of
subdirectories unless "subdirectories": null is set to null for that
directory.