Commit Graph

126 Commits

Author SHA1 Message Date
Johannes Zellner
11c2cecc9e Ensure we only add a leading / when we have a prefix
Part of #343
2017-07-19 14:35:35 +02:00
Girish Ramakrishnan
6fc69c05ca Add noop storage backend
This is sometimes useful when an update gets stuck because of some
bug in backup logic.

Note that you cannot restore from this backend because nothing is
saved.
2017-05-22 10:45:01 -07:00
Girish Ramakrishnan
6ef2f974ae fs: Use key to determine backup extension 2017-05-08 16:03:29 -07:00
Girish Ramakrishnan
dacc66bb35 Ignore fifo files during backup
Fixes #318
2017-05-01 10:11:41 -07:00
Girish Ramakrishnan
7a3d3a3c74 Fix usage of tar.gz API 2017-04-30 17:42:55 -07:00
Girish Ramakrishnan
e5c42f2b90 Do a multipart download for slow internet connections
Fixes #317
2017-04-28 17:28:40 -07:00
Girish Ramakrishnan
9635f9aa24 Use key to determine if we should encrypt or not
When encrypting we use the .enc extension. When not encrypting, we
use the plain .tar.gz extension.

Fixes #315
2017-04-28 14:50:20 -07:00
Girish Ramakrishnan
893f9d87bc make s3 upload use queueSize of 1 2017-04-28 14:50:08 -07:00
Girish Ramakrishnan
bfda0d4891 drop support for old format backups 2017-04-28 14:45:44 -07:00
Johannes Zellner
a723203b28 Fix typo of missing data argument 2017-04-25 13:48:12 +02:00
Girish Ramakrishnan
ca5723bbc7 more work on tests
disable the migrate tests for now
2017-04-24 15:45:23 -07:00
Girish Ramakrishnan
81b705b25b give inner callback variable a different name 2017-04-23 22:51:07 -07:00
Girish Ramakrishnan
f79e1993cb use debug() more 2017-04-23 22:10:44 -07:00
Girish Ramakrishnan
aeba8e8fd2 Use retentionSecs to cleanup backups
Part of #310
2017-04-23 19:34:00 -07:00
Girish Ramakrishnan
d91e8bb87b add minio as a separate backend
Fixes #308
2017-04-22 13:34:43 -07:00
Johannes Zellner
a7d7935451 Remove backup download code 2017-04-22 22:17:29 +02:00
Girish Ramakrishnan
c41b2c32f5 Fix debug 2017-04-22 11:50:12 -07:00
Girish Ramakrishnan
1cca0aee6e refactor targz logic into separate file 2017-04-21 15:45:45 -07:00
Girish Ramakrishnan
be73ec4b66 Add oldFormat support to caas and s3 backends 2017-04-21 15:06:54 -07:00
Girish Ramakrishnan
0aea7cc347 Add progress-stream for upload/download progress 2017-04-21 12:07:01 -07:00
Johannes Zellner
f516dddf30 Detect old backup format and pipe to openssl 2017-04-21 19:39:02 +02:00
Johannes Zellner
8fb1bc29d1 Fix storage tests for filesystem and s3 2017-04-21 17:21:10 +02:00
Johannes Zellner
8e1f190079 Implement check configuration for filesystem backend 2017-04-21 15:37:57 +02:00
Johannes Zellner
33492333c7 Fix backupDone() for caas 2017-04-21 10:31:43 +02:00
Johannes Zellner
710cdc7bb8 Bring storage interface up to date 2017-04-21 10:01:58 +02:00
Johannes Zellner
0471a14894 We always encrypt even with empty key so make that clear with the file extension 2017-04-21 09:59:27 +02:00
Girish Ramakrishnan
a6c2c608e4 storage/caas: bring it upto speed for new backup design 2017-04-20 20:12:45 -07:00
Girish Ramakrishnan
1cd36319ff s3: support setting the signatureVersion 2017-04-20 19:56:06 -07:00
Girish Ramakrishnan
a65611a37b Fix error handling in s3 backend 2017-04-20 19:27:12 -07:00
Girish Ramakrishnan
4769d14414 Mark all fs failures as external errors
This gets the right error message on failures:

$ cloudron machine backup create
Waiting for backup to finish...backup failed: ENOENT: no such file or directory, open '/var/backups/2017-04-21-013900-584/app_7549c6a1-682e-4150-8b40-2c31a3fa92f7_2017-04-21-013900-591_v0.7.1.tar.gz'
2017-04-20 19:01:12 -07:00
Girish Ramakrishnan
0584ace954 Remove StorageError from backends 2017-04-20 18:12:29 -07:00
Girish Ramakrishnan
77d23d6c15 return BackupsError on error 2017-04-20 18:12:29 -07:00
Girish Ramakrishnan
31ea1e677c Simply change ownership instead instead of umask fiddling 2017-04-20 18:12:25 -07:00
Girish Ramakrishnan
83f36981f7 Make box backups work again 2017-04-20 16:26:42 -07:00
Johannes Zellner
788873e858 Add error callbacks for backup in filesystem and s3 2017-04-20 16:18:27 +02:00
Johannes Zellner
d9a0bf457d Don't make backup files executable 2017-04-20 16:02:13 +02:00
Johannes Zellner
9f117fcfdc Also simplify the s3 backend 2017-04-20 15:35:52 +02:00
Johannes Zellner
fe01d1bf28 Keep storage api as simple as possible
Do not support the directory mapping, which is only used for box backups
This greatly simplifies things, but needs a special fix for the box.
2017-04-20 15:20:11 +02:00
Johannes Zellner
40f5d0412b Bring the caas storage backend up to speed
This is mostly the same as the s3 backend at the moment
2017-04-19 13:30:05 +02:00
Johannes Zellner
65af062c33 Cleanup linter issues 2017-04-19 13:20:24 +02:00
Johannes Zellner
d5db9657ca Add s3 mock for the s3 storage tests 2017-04-18 19:15:56 +02:00
Johannes Zellner
ad9cb00f13 Add s3 storage removeBackup() and getDownloadStream() implementations 2017-04-18 17:33:59 +02:00
Johannes Zellner
5ccca76b17 Fix typo 2017-04-18 17:33:17 +02:00
Johannes Zellner
cec52e14f6 Remove s3 backup test shell script 2017-04-18 16:58:27 +02:00
Johannes Zellner
261d15f0f7 Handle S3 not found errors 2017-04-18 16:47:49 +02:00
Johannes Zellner
14fe1dde58 s3 storage backend with backup and restore implemented 2017-04-18 16:28:39 +02:00
Johannes Zellner
737bbd26ee sort requires alphabetically 2017-04-18 15:32:59 +02:00
Johannes Zellner
f5db7c974f Sync the storage interface api 2017-04-18 14:55:22 +02:00
Johannes Zellner
7303a09f2f Support older backupIds which already include the type prefix 2017-04-18 14:39:48 +02:00
Johannes Zellner
5dd10e7cd2 app restoreConfig file api is no more in the filesystem backend 2017-04-18 12:11:05 +02:00