![]() ![]() ![]() Since the preferences file has passwords, let’s lock down the access to it: data]# chmod -R 600. The preferences file now has enough information stored in it to be able to backup to a B2 account and not require user interaction. data]# duplicacy set -storage backblaze_b2_data -key password -value "MY_ENCRYPTION_PASSWORD" data]# duplicacy set -storage backblaze_b2_data -key b2_key -value MY_BACKBLAZE_APPLICATION_KEY New options for storage b2://MY-B2-BUCKET-NAME have been saved Now let’s load the Backblaze account ID, application key, and encryption password for the B2 storage into the preferences file to enable set-and-forget backups: data]# duplicacy set -storage backblaze_b2_data -key b2_id -value MY_BACKBLAZE_ACCOUNT_ID "storage": /path/to/local/backup/location/", path/to/my/data will be backed up to b2://MY-B2-BUCKET-NAME with id data_backup Now enter the B2 account ID, application key, and encryption password when prompted: Enter Backblaze Account ID:MY_BACKBLAZE_ACCOUNT_IDĮnter Backblaze Application key:MY_BACKBLAZE_APPLICATION_KEYĮnter storage password for b2://MY-B2-BUCKET-NAME:********************************* (Consider also adding the ‘-copy’ option to make the B2 and local backups copy-compatible.) Now add a second storage location for the Backblaze B2 bucket: data]# duplicacy add -e backblaze_b2_data data_backup b2://MY-B2-BUCKET-NAME ![]() duplicacy/preferences.bak, that contains the original preferences file (in case something goes wrong here). The preceding command uses a Perl one-liner to substitute text in-place in a file. This will be the locally-connected backup (the external hard drive), so rename it to describe exactly what this storage is: data]# perl -pi.bak -e 's/default/my_external_hard_drive_backup/'. Now change the name “default” to something more descriptive. "storage": "/path/to/local/backup/location/", path/to/my/data will be backed up to /path/to/local/backup/location with id data_backup Assuming a destination for the backed up data is “/path/to/local/backup/destination”, you would issue the following command: data]# duplicacy init -e data_backup /path/to/local/backup/locationĮnter storage password for /path/to/local/backup/location /:********************************* The “-e” option indicates that this data will be encrypted with a password, so enter (and re-enter) the desired encryption password when prompted with the duplicacy init command. The first step will be to initialize the duplicacy backups at the directory to be backed up (“repository” in duplicacy terminology). (Your results will reflect the amount of data contained under your current directory, which is likely to be different than this sample amount.) Let’s see how much data is to be backed up: data]# du -s -h Identify the directory to be backed up: ~]# cd /path/to/my/data The current download costs are $0.01/GB past 1 GB per day, so the download caps may also need to be adjusted when restoring data, for instance. Assuming 30 days/month, this amounts to $0.1667/TB/day, so a cap of $2 per day in storage cost allows for up to 12 TB. As of this writing (2018-Jun) the pricing for Backblaze B2 storage is $0.005/GB/month. (Backblaze B2 buckets only allow alphanumeric characters and hyphens.)Īnd last, if you’re going to be backing up more than the free amount of B2 storage (10 GB as of this writing), then on Backblaze’s website you will need to go to B2 Cloud Storage -> Caps and Alerts, and adjust the maximum daily storage cap. Substitute this bucket name for the placeholder MY-B2-BUCKET-NAME in this wiki. The name for the bucket must be unique across all buckets by all Backblaze B2 users. Next, from Backblaze’s website, create a B2 bucket. You will receive a B2 Account ID and a B2 Application Key from Backblaze. The first step is to create a Backblaze account, and sign up for B2 storage. This wiki describes how to take a large amount of data and back it up to both a local backup, such as an external hard drive, and a Backblaze B2 account using the CLI on Linux. Backblaze B2 has become a popular cost-effective online storage mechanism, and is typically less expensive than competing services such as Amazon S3.
0 Comments
Leave a Reply. |