restic-install-on-macos:
    brew install restic

restic-install-on-linux:
    sudo apt-get install --yes restic

# Local
restic-initialize:
    RESTIC_PASSWORD=passw0rd \
    restic init --repo=/tmp/restic-backup

restic-backup:
    RESTIC_PASSWORD=passw0rd \
    restic backup --repo=/tmp/restic-backup ../hm-alpine

restic-list-snapshots:
    RESTIC_PASSWORD=passw0rd \
    restic list --repo=/tmp/restic-backup snapshots

restic-restore:
    RESTIC_PASSWORD=passw0rd \
    restic restore --repo=/tmp/restic-backup --target=/tmp/restic-restore xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# SFTP
restic-init-sftp:
    RESTIC_PASSWORD=passw0rd \
    restic --repo=sftp:parallels@10.211.55.4:/tmp/restic-backup init

restic-backup-sftp:
    RESTIC_PASSWORD=passw0rd \
    restic backup --repo=sftp:parallels@10.211.55.4:/tmp/restic-backup ../hm-alpine

restic-list-snapshots-sftp:
    RESTIC_PASSWORD=passw0rd \
    restic list --repo=sftp:parallels@10.211.55.4:/tmp/restic-backup snapshots

restic-restore-sftp:
    RESTIC_PASSWORD=passw0rd \
    restic restore --repo=sftp:parallels@10.211.55.4:/tmp/restic-backup --target=/tmp/restic-restore xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
