Various hacks for exoscale-sos

SOS does not like multipart uploads. They just fail randomly.

As a fix, we try to detect filesystem files and skip multipart uploads
for files < 5GB. For > 5GB, we do multipart upload anyways (mostly fails).

The box backup is switched to flat-file for exoscale for the reason
above.
This commit is contained in:
Girish Ramakrishnan
2017-10-10 10:47:41 -07:00
parent 754b29b263
commit 78807782df
2 changed files with 23 additions and 10 deletions
+2 -2
View File
@@ -459,7 +459,7 @@ function uploadBoxSnapshot(backupConfig, callback) {
// for the moment, box backups are always tarball based. this is because it makes it easy to restore
// in the future, if required, we can move out the mailboxes to a separate virtual app backup
const format = 'tgz';
const format = backupConfig.provider === 'exoscale-sos' ? 'flat-file' : 'tgz'; // see also rotateBoxBackup
runBackupTask('snapshot/box', format, paths.BOX_DATA_DIR, function (error) {
if (error) return callback(error);
@@ -482,7 +482,7 @@ function rotateBoxBackup(backupConfig, timestamp, appBackupIds, callback) {
var snapshotTime = snapshotInfo.timestamp.replace(/[T.]/g, '-').replace(/[:Z]/g,'');
var backupId = util.format('%s/box_%s_v%s', timestamp, snapshotTime, config.version());
const format = 'tgz';
const format = backupConfig.provider === 'exoscale-sos' ? 'flat-file' : 'tgz'; // // see also uploadBoxSnapshot
debug('rotateBoxBackup: rotating to id:%s', backupId);