1
0
script for partial incremental backups intended for backing up Android phones
Go to file
2026-08-13 02:40:31 -07:00
.gitignore Initial commit 2026-08-13 05:29:58 -04:00
backup-phone.py Initial code commit. 2026-08-13 02:32:09 -07:00
LICENSE Initial commit 2026-08-13 05:29:58 -04:00
README.md Write something in the README. 2026-08-13 02:40:31 -07:00

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.