Skip to content

Quickstart

This is the shortest path to a first backup. Pick the interface you installed, make a backup, and restore it.

Make a backup

docker run -it \
    -v /path/to/source:/source:ro \
    -v /path/to/backups:/backups \
    -e EZBAK_ACTION=backup \
    -e EZBAK_NAME=my-backup \
    -e EZBAK_SOURCE_PATHS=/source \
    -e EZBAK_STORAGE_PATHS=/backups \
    -e EZBAK_KEEP_LAST=7 \
    ghcr.io/natelandau/ezbak:latest
ezbak --name my-backup --storage ~/Backups create --source ~/Documents
from ezbak import ezbak

backups = ezbak(
    name="my-backup",
    source_paths=["/data"],
    storage_paths=["/backups"],
)
backups.create_backup()

A backup file appears in your storage location, named my-backup-20241215T143022.tgz. For the format, see Backup names.

List what you have

ezbak --name my-backup --storage ~/Backups list
print([backup.name for backup in backups.list_backups()])

Restore it

docker run -it \
    -v /path/to/backups:/backups:ro \
    -v /path/to/restore:/restore \
    -e EZBAK_ACTION=restore \
    -e EZBAK_NAME=my-backup \
    -e EZBAK_STORAGE_PATHS=/backups \
    -e EZBAK_RESTORE_PATH=/restore \
    ghcr.io/natelandau/ezbak:latest
ezbak --name my-backup --storage ~/Backups restore --restore-path ~/restore
backups.restore_backup(restore_path="/restore")

That is a full cycle: create, list, restore.

Where to go next