Last active
August 12, 2019 02:28
-
-
Save jralvarezc/f709968b51736fd732f56b91668050e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sign-up at https://www.borgbase.com/ | |
# Generate key pair (password? luks?) | |
$ ssh-keygen -o -a 100 -t ed25519 | |
# Upload public key to borgbase as APPEND-ONLY | |
$ cat ~/.ssh/id_ed25519.pub | |
# Check plan capacity vs total backup size, then pay! ;) | |
# Install software | |
$ nix-env -i borgbase | |
# Get the repo URL from https://www.borgbase.com/ | |
# Init repo | |
borg init -e repokey-blake2 [email protected]:repo | |
The authenticity of host 'X.repo.borgbase.com (A.B.C.D)' can't be established. | |
ECDSA key fingerprint is SHA256:Y. | |
Are you sure you want to continue connecting (yes/no)? yes | |
Remote: Warning: Permanently added 'X.repo.borgbase.com,A.B.C.D' (ECDSA) to the list of known hosts. | |
Enter passphrase for key '$HOME/.ssh/id_W': | |
Enter new passphrase: | |
Enter same passphrase again: | |
... | |
IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo! | |
Use "borg key export" to export the key, optionally in printable format. | |
Write down the passphrase. Store both at safe place(s). | |
# Export key to be printed | |
$ borg key export [email protected]:repo $HOME/.secrets/borgbase-key.txt | |
Enter passphrase for key '$HOME/.ssh/id_W': | |
$ cat borgbase-key.txt | |
BORG_KEY ................ | |
# Create first backup | |
$ borg create --verbose --progress --stats \ | |
--compression auto,lzma,9 \ | |
[email protected]:repo::{hostname}-{user}-{now} \ | |
$HOME \ | |
--exclude "$HOME/.cache" | |
Enter passphrase for key '$HOME/.ssh/id_W': | |
Enter passphrase for key ssh://[email protected]/./repo: | |
2.92 GB O 2.07 GB C 496.97 MB D 59365 N $HOME/old...lbox/box-disk001.vmdk | |
# using compression 4 days, 7 attempts to backup 65GiB, try another system | |
# TODO | |
# a. --chunk-size | |
# https://zyradyl.moe/2016/10/02/Collegi-Backup-System/ | |
# https://github.com/borgbackup/borg/blob/master/docs/misc/create_chunker-params.txt | |
# https://borgbackup.readthedocs.io/en/stable/usage/notes.html#chunker-params | |
# b. rsync.net as a cloudprovider | |
# https://jstaf.github.io/2018/03/12/backups-with-borg-rsync.html | |
# c. check backups commands | |
# d. restore commands |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment