Commit Graph

73 Commits

Author SHA1 Message Date
Girish Ramakrishnan
a9e89b57d9 merge caas storage into s3 backend 2017-09-26 12:28:33 -07:00
Girish Ramakrishnan
0a60365143 Initial version of flat-file uploader 2017-09-26 00:17:11 -07:00
Girish Ramakrishnan
b0f85678d4 Implement downloadDir for flat-file format 2017-09-23 18:07:26 -07:00
Girish Ramakrishnan
e43413e063 implement remove dir in storage backends 2017-09-23 12:34:51 -07:00
Girish Ramakrishnan
97da8717ca Refactor backup strategy logic into backups.js 2017-09-20 14:09:55 -07:00
Girish Ramakrishnan
26f33a8e9b Send resolved path to the storage APIs 2017-09-19 21:58:35 -07:00
Girish Ramakrishnan
a3293c4c35 Fix tests 2017-09-19 12:43:13 -07:00
Girish Ramakrishnan
4892473eff backupIds do not have extension anymore
this code existed for legacy reasons
2017-09-19 12:34:09 -07:00
Girish Ramakrishnan
221d5f95e1 ensure backupFolder is always set 2017-09-19 12:34:09 -07:00
Girish Ramakrishnan
8ced0aa78e copy: use hardlinks to preserve space 2017-09-18 14:29:48 -07:00
Girish Ramakrishnan
f5d32a9178 copyBackup -> copy 2017-09-18 14:29:15 -07:00
Girish Ramakrishnan
781f543e87 Rename API calls in the storage backend 2017-09-17 18:50:29 -07:00
Girish Ramakrishnan
b0ee116004 targz: make sourceDir a string 2017-09-17 18:50:15 -07:00
Girish Ramakrishnan
e78d976c8f Fix backup mapping (mail dir has moved) 2017-09-13 09:51:20 -07:00
Girish Ramakrishnan
6ef2f974ae fs: Use key to determine backup extension 2017-05-08 16:03:29 -07:00
Girish Ramakrishnan
7a3d3a3c74 Fix usage of tar.gz API 2017-04-30 17:42:55 -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
Johannes Zellner
a7d7935451 Remove backup download code 2017-04-22 22:17:29 +02:00
Girish Ramakrishnan
1cca0aee6e refactor targz logic into separate file 2017-04-21 15:45:45 -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
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
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
65af062c33 Cleanup linter issues 2017-04-19 13:20:24 +02:00
Johannes Zellner
5ccca76b17 Fix typo 2017-04-18 17:33:17 +02:00
Johannes Zellner
737bbd26ee sort requires alphabetically 2017-04-18 15:32:59 +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
Johannes Zellner
9c45dec8b0 Fix permissions for the filesystem backend
node will always apply the umask, so we have to set and then restore it
properly
2017-04-17 20:26:06 +02:00
Johannes Zellner
7b93150047 Also add intermediate removeAppRestoreConfig() api 2017-04-17 20:26:06 +02:00
Johannes Zellner
a98177fe71 Ensure non-root permissions to the backups 2017-04-17 20:26:06 +02:00
Johannes Zellner
4d42c116ce Implement all the apis for the filesystem storage backend 2017-04-17 20:26:05 +02:00
Johannes Zellner
6d8cf8456e Add filesystem backend encryption support
We will probably remove this but lets keep this for now
just to keep changes low in the next release.
2017-04-17 20:26:05 +02:00
Johannes Zellner
5e1ad4ad93 We need root access to copy backup files with the filesystem backend 2017-04-17 20:26:05 +02:00
Johannes Zellner
bd7625031e The writeable stream end event is 'finished' 2017-04-17 20:26:05 +02:00
Johannes Zellner
9e881d1934 Gunzip the app backups 2017-04-17 20:25:59 +02:00
Johannes Zellner
31f93f0255 Use the directory property not the object 2017-04-17 20:09:10 +02:00