This is a simple page holding helpful snippets that I need to continue building a decent backup flow
/volume1/apps/kopia/kopia repository create sftp --path=./diskstation --host=u465088.your-storagebox.de --username=u465088-sub1 --cache-directory=/volume1/apps/kopia/cache --port=23 --description="HetznerStorageBox-diskstation" --external --known-hosts=/var/services/homes/admin/.ssh/knwon-hosts --keyfile=/var/services/homes/admin/.ssh/id_rsa_4k
/volume1/apps/kopia/kopia --config-file=/var/services/homes/admin/.config/kopia/repository.config --log-dir=/volume1/apps/kopia/logs/ snapshot create /volume1/Storage
/volume1/apps/kopia/kopia policy set --global --compression=ztsd
/volume1/apps/kopia/kopia --config-file=/var/services/homes/admin/.config/kopia/repository.config --log-dir=/volume1/apps/kopia/logs/ snapshot create --all
volume1/apps/kopia/kopia --config-file=/var/services/homes/admin/.config/kopia/repository.config --log-dir=/volume1/apps/kopia/logs/ snapshot create --parallel=8 /volume1/homes/Mark &> /volume1/apps/kopia/logs/stdout.txt
encryption key of ./diskstation repository ZVdxd0Ftb3NOdkRjZVFaN0Rv
At this time, kopia is a simple Go app that is loaded into the /volume1/apps/kopia directory. See the documentation for more details
I have run a few 1-time setup commands. Initially I was doing it from an SSH session and then backing things up to my hetzner StorageBox. However, my ISP bandwidth upload speed is not very high. And keeping the SSH session up over the multiple months necessary to do the intiail snapshot was painful. So, now I have loaded a few of the key commands above into Diskstation Scheduled tasks and let the NAS crunch on it for a long time. I can verify the progress by using these commands from the NAS:
tail -f /volume1/apps/kopia/logs/stderr.txt
tail -f /volume1/apps/kopia/logs/cli-logs/latest.log
This was a log of the setup that I did while I was SSHed into the NAS. It is a one-time operation, but contains some useful info and note-for-the-record stuff I wanted to hold on to
dmin@DiskStation:~$ /volume1/apps/kopia/kopia repository create sftp --path=./diskstation --host=u465088.your-storagebox.de --username=u465088-sub1 --cache-directory=/volume1/apps/kopia/cache --port=23 --description="HetznerStorageBox-diskstation" --external --known-hosts=/var/services/homes/admin/.ssh/knwon-hosts --keyfile=/var/services/homes/admin/.ssh/id_rsa_4k
u465088-sub1@u465088.your-storagebox.de's password:
Enter password to create new repository:
Re-enter password for verification:
Initializing repository with:
block hash: BLAKE2B-256-128
encryption: AES256-GCM-HMAC-SHA256
key derivation: scrypt-65536-8-1
splitter: DYNAMIC-4M-BUZHASH
u465088-sub1@u465088.your-storagebox.de's password:
Connected to repository.
NOTICE: Kopia will check for updates on GitHub every 7 days, starting 24 hours after first use.
To disable this behavior, set environment variable KOPIA_CHECK_FOR_UPDATES=false
Alternatively you can remove the file "/var/services/homes/admin/.config/kopia/repository.config.update-info.json".
u465088-sub1@u465088.your-storagebox.de's password:
Retention:
Annual snapshots: 3 (defined for this target)
Monthly snapshots: 24 (defined for this target)
Weekly snapshots: 4 (defined for this target)
Daily snapshots: 7 (defined for this target)
Hourly snapshots: 48 (defined for this target)
Latest snapshots: 10 (defined for this target)
Ignore identical snapshots: false (defined for this target)
Compression disabled.
To find more information about default policy run 'kopia policy get'.
To change the policy use 'kopia policy set' command.
NOTE: Kopia will perform quick maintenance of the repository automatically every 1h0m0s
and full maintenance every 24h0m0s when running as admin@diskstation.
See https://kopia.io/docs/advanced/maintenance/ for more information.
NOTE: To validate that your provider is compatible with Kopia, please run:
$ kopia repository validate-provider