1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-21 03:02:09 +00:00

Added B2 to Backup, renamed B2Blaze to B2 Storage

This commit is contained in:
Carson Page 2017-10-17 06:58:05 -05:00
parent b7583346fc
commit 0d45ddaaf2
3 changed files with 14 additions and 6 deletions

View File

@ -473,10 +473,18 @@ def list_target_files(config):
raise ValueError(e.reason)
return [(key.name[len(path):], key.size) for key in bucket.list(prefix=path)]
elif target.scheme == "b2":
else:
raise ValueError(config["target"])
def b2_perform_authentication(acc_id, app_key):
# Perform Authentication with B2 Storage. Returns a tuple
# containing the auth token and the API endpoint to use.
from urllib.request import Request, urlopen
import base64
import json
req = Request()
def backup_set_custom(env, target, target_user, target_pass, min_age):
config = get_backup_config(env, for_save=True)

View File

@ -18,7 +18,7 @@
<option value="local">{{hostname}}</option>
<option value="rsync">rsync</option>
<option value="s3">Amazon S3</option>
<option value="b2">B2Blaze</option>
<option value="b2">B2 Storage</option>
</select>
</div>
</div>
@ -105,11 +105,11 @@
<input type="text" class="form-control" rows="1" id="backup-target-pass">
</div>
</div>
<!-- B2Blaze BACKUP -->
<!-- B2 Storage BACKUP -->
<div class="form-group backup-target-b2">
<div class="col-sm-10 col-sm-offset-2">
<p>Backups are stored in an B2Blaze bucket. You must have an B2Blaze account already.</p>
<p>You MUST manually copy the encryption password from <tt class="backup-encpassword-file"></tt> to a safe and secure location. You will need this file to decrypt backup files. It is NOT stored in your B2Blaze bucket.</p>
<p>Backups are stored in an B2 Storage bucket. You must have an B2 Storage account already.</p>
<p>You MUST manually copy the encryption password from <tt class="backup-encpassword-file"></tt> to a safe and secure location. You will need this file to decrypt backup files. It is NOT stored in your B2 Storage bucket.</p>
</div>
</div>
<div class="form-group backup-target-b2">

View File

@ -132,7 +132,7 @@ hide_output apt-get update
# ### Add duplicity PPA
# We would use the package in the system repository, but the version in the system repo
# does not support some backends like B2Blaze. This adds the stable PPA that should be
# does not support some backends like B2 Storage. This adds the stable PPA that should be
# reasonably reliable. This also enables the ability for duplicity to be upgraded to the
# latest version. Since the relibility of this package affects the stabillity of system
# backups, unintended upgrades are not enabled.