Commit Graph

139 Commits

Author SHA1 Message Date
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
Johannes Zellner 3fad5e856c Do not cleanup any app backups which are referenced by an app through lastBackupId 2017-04-24 13:50:46 +02:00
Johannes Zellner cc66830a2d Also cleanup app backups which are not referenced by a box backup 2017-04-24 13:41:23 +02:00
Johannes Zellner 880f7b4cd3 Allow to get backups by type in backupdb 2017-04-24 12:41:19 +02:00
Johannes Zellner 410420e9d5 Ensure we keep at least one backup on cleanup
If for some reason backups fail for longer than the retention time
we should at least keep the latest around
2017-04-24 12:01:52 +02:00
Girish Ramakrishnan aeba8e8fd2 Use retentionSecs to cleanup backups
Part of #310
2017-04-23 19:34:00 -07:00
Girish Ramakrishnan a0e122e578 Try to make tests work again 2017-04-23 18:03:40 -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 6c8b9b8799 Propagate error messages from backuptask into box code 2017-04-21 14:26:34 -07:00
Johannes Zellner 33492333c7 Fix backupDone() for caas 2017-04-21 10:31:43 +02:00
Girish Ramakrishnan 64c2f3d8c3 copyBackup() already returns a BackupError 2017-04-20 18:56:34 -07:00
Girish Ramakrishnan a5efdb067d Revert "Add apprestoretask.js"
This reverts commit 926224bd5d.

This shouldn't be required. We already fix the perms

See 7035b3c18a
2017-04-20 18:12:29 -07:00
Girish Ramakrishnan 0584ace954 Remove StorageError from backends 2017-04-20 18:12:29 -07:00
Girish Ramakrishnan 2479af23ab app backups must have app version (and not box version) 2017-04-20 17:29:21 -07:00
Johannes Zellner 926224bd5d Add apprestoretask.js 2017-04-20 16:10:13 +02:00
Johannes Zellner 6a5b0c194f No more restore mapping 2017-04-20 15:37:49 +02:00
Johannes Zellner a94d44da75 Add generic node.sh to run node apps as root and with memory limitations 2017-04-20 15:20:11 +02:00
Johannes Zellner 3cae400b63 We still want to store the restoreConfig config.json as part of the backup itself 2017-04-18 12:16:32 +02:00
Johannes Zellner 23e3b0bd91 Get the restoreConfig from the database instead of the json file 2017-04-18 12:08:26 +02:00
Johannes Zellner 7a39cdda97 Store restoreConfig on backups 2017-04-18 12:02:15 +02:00
Johannes Zellner a21750a4c9 Fix the mysql dump commandline 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 ff3a748398 Call backuptask.js directly as root to avoid trampoline shell scripts 2017-04-17 20:26:05 +02:00
Johannes Zellner e021a4b377 Remove unused restoreapp.sh 2017-04-17 20:26:05 +02:00
Johannes Zellner 3879b55642 Also copy the app restore config file 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 7fdf491815 Add backuptask.js to work with new storage interface 2017-04-17 20:09:02 +02:00
Johannes Zellner 602f8bcd04 Split platform and app data folders and get rid of btrfs volumes 2017-04-04 12:34:55 +02:00
Girish Ramakrishnan 895f5f7398 Expand backup error in the mail 2017-01-26 13:03:36 -08:00
Girish Ramakrishnan 3e21b6cad3 Add ensureBackup log 2017-01-26 12:47:23 -08:00
Johannes Zellner 5219eff190 Remove 'app at' for app backup message 2017-01-12 16:00:57 +01:00
Johannes Zellner d98f64094e Set the correct progress percentage 2017-01-12 16:00:56 +01:00
Johannes Zellner 1c9f2495e3 Show the detailed backup progress during update
Fixes #157
2017-01-12 16:00:34 +01:00
Girish Ramakrishnan 20a75b7819 tag -> prefix 2017-01-05 23:20:02 -08:00
Girish Ramakrishnan 967bab678d Fix listing of app backups
The id can now contain path and not just the filename
2017-01-05 01:03:44 -08:00
Girish Ramakrishnan 135c296ac7 Remove the Z suffix 2017-01-05 00:12:31 -08:00
Girish Ramakrishnan e83ee48ed5 Pass collation tag to backup functions
Fixes #159
2017-01-05 00:10:16 -08:00
Girish Ramakrishnan 1539fe0906 preserve msecs portion in backup file format
this is required because the second precision causes backups to fail
because of duplicate file name. this happens in tests.

part of #159
2017-01-04 21:57:03 -08:00
Girish Ramakrishnan ceb78f21bb remove redundant reuseOldAppBackup 2017-01-04 21:20:36 -08:00
Girish Ramakrishnan 794efb5ef5 Merge backupDone webhook into caas storage backend 2017-01-04 16:29:25 -08:00
Girish Ramakrishnan 2b27e554fd Change backup filenames
appbackup_%s_%s-v%s.tar.gz -> app_%s_%s_v%s.tar.gz
    drop 'backup'. rationale: it is known these files are backups
    timestamp has '-'. rationale: colon in filename confuses tools like scp (they think it is a hostname)

backup_%s-v%s.tar.gz -> box_%s_v%s.tar.gz
    drop 'backup' and name it 'box'. this makes it clear it related to the box backup
    timestamp has '-'. rationale: colon in filename confuses tools like scp (they think it is a hostname)

Part of #159
2017-01-04 13:36:25 -08:00
Girish Ramakrishnan e547a719f6 remove dead code 2017-01-04 13:35:39 -08:00
Girish Ramakrishnan 4313d8a28c Send mail when backup fails
Fixes #9
2016-10-14 15:08:41 -07:00
Johannes Zellner cac85b17bc Add backup config test for each backend 2016-10-11 11:36:25 +02:00
Johannes Zellner f576f38e4c Calculate the backup checksum for client side verification
Fixes #54
2016-10-10 18:11:25 +02:00
Johannes Zellner b0a8ba85e1 Also remove the db records for deleted backups 2016-10-10 16:25:43 +02:00
Johannes Zellner 1e65142f47 Use rmbackup.sh instead of fs.unlink() due to root ownership 2016-10-10 16:25:43 +02:00
Johannes Zellner c129328828 There is no result 2016-10-10 16:25:43 +02:00
Johannes Zellner c7e5c09bb9 Adjust removeBackup() api 2016-10-10 15:45:48 +02:00