Commit Graph

443 Commits

Author SHA1 Message Date
Johannes Zellner
fa828cc661 Basic backup listing for filesystem backend 2016-09-20 09:25:48 +02:00
Johannes Zellner
04b7822be5 Implement filesystem storage backend getRestoreUrl() 2016-09-20 09:25:48 +02:00
Johannes Zellner
1fd96a847f Implement filesystem storage backend copy 2016-09-20 09:25:48 +02:00
Johannes Zellner
bf177473fe Rename getBackupDetails() -> getBoxBackupDetails() 2016-09-20 09:25:48 +02:00
Johannes Zellner
2ce768e29a Refactor getAppBackupCredentials() 2016-09-20 09:25:48 +02:00
Johannes Zellner
96c8f96c52 Group exports 2016-09-20 09:25:48 +02:00
Johannes Zellner
83ed87a8eb Refactor getBackupCredentials() 2016-09-20 09:25:48 +02:00
Johannes Zellner
1736d50260 Add filesystem storage backend only as noop currently 2016-09-20 09:25:48 +02:00
Johannes Zellner
10e7f27b16 Actually we need to specify the signatureVersion... 2016-09-13 12:07:09 +02:00
Girish Ramakrishnan
c1bb264065 Set a timeout for superagent
The default is 'no timeout' and it will wait for the response forever.

https://github.com/visionmedia/superagent/issues/17#issuecomment-207742985
2016-09-12 13:06:18 -07:00
Johannes Zellner
8de0746ac8 Revert "Use S3 signature versoin 4 to support all regions"
If we set the correct region name, the signature version is selected
automatically

This reverts commit 1e22cc3236.
2016-09-12 14:27:47 +02:00
Johannes Zellner
1e22cc3236 Use S3 signature versoin 4 to support all regions
http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
2016-09-09 20:07:57 +02:00
Girish Ramakrishnan
22d86ff5b9 create signed urls that are valid for a day
sometimes the downloads take overly long and it's annoying that they
expire so soon.
2016-08-24 17:53:31 -07:00
Girish Ramakrishnan
4ed368cdd8 remove getBackupUrl 2016-04-10 22:12:06 -07:00
Girish Ramakrishnan
4565291c1c use aws-cli to upload box backups 2016-04-10 18:22:05 -07:00
Girish Ramakrishnan
08b5d7003d expose getBackupCredentials from storage api 2016-04-10 10:55:59 -07:00
Girish Ramakrishnan
497eaea65e bump expiry to 60 mins 2016-04-04 16:02:13 -07:00
Girish Ramakrishnan
8aacc503a6 Revert "getRestoreUrl now uses caas restore api"
This reverts commit f9fc9325a8995dc0a9cb1dfcf22fb27eca697a89.

For now, we can simply assume that caas is s3 based.
2016-04-04 15:57:32 -07:00
Girish Ramakrishnan
ec160fe45f make getBackupUrl return id as well 2016-04-04 12:45:09 -07:00
Girish Ramakrishnan
c9ef0056e0 rename getSignedUploadUrl to getBackupUrl 2016-04-04 12:01:47 -07:00
Girish Ramakrishnan
efb228cf5e getRestoreUrl now uses caas restore api 2016-04-04 11:57:29 -07:00
Girish Ramakrishnan
af700827c5 info is not passed anymore 2016-04-04 11:44:24 -07:00
Girish Ramakrishnan
3135783fe3 rename getSignedDownloadUrl to getRestoreUrl 2016-04-04 11:43:56 -07:00
Girish Ramakrishnan
496f530b9f sessionToken is required in credentials (when signing) 2016-04-04 11:23:38 -07:00
Girish Ramakrishnan
d839f0b762 remove redundant session token 2016-04-03 23:23:23 -07:00
Girish Ramakrishnan
16a65fb185 drop configJson
The initial idea was to store exactly where the backups are stored.
But this only causes problems for migrations where the bucket might
change and clones where the prefix (box.id) changes.

Thus, it's best to leave the url creation to the caas side. (That
has to be done in another change)
2016-04-03 22:55:08 -07:00
Girish Ramakrishnan
357f6f0552 use same region as what we uploaded to 2016-04-02 13:32:14 -07:00
Girish Ramakrishnan
b16aa4c007 check for region as well 2016-04-02 13:31:12 -07:00
Girish Ramakrishnan
3ea2070cdb pass filename (it is not part of the config!) 2016-03-31 09:53:56 -07:00
Girish Ramakrishnan
fc11484b51 pick region from apiConfig if present 2016-03-31 09:48:38 -07:00
Girish Ramakrishnan
b4ddfa94cc rename to apiConfig 2016-03-31 09:48:13 -07:00
Girish Ramakrishnan
39cc5d07d1 use the backupdb config to determine bucket and prefix 2016-03-31 00:50:56 -07:00
Johannes Zellner
09c7aa4440 Remove whitespace 2016-01-29 11:54:58 +01:00
Johannes Zellner
e51234928b Add FIXME for selfhost backup listing 2016-01-19 13:32:11 +01:00
Johannes Zellner
030faaa5d1 Remove unused information within backup listing 2015-12-30 20:31:00 +01:00
Johannes Zellner
41c597801f Sort backups by creationTime 2015-12-30 18:31:44 +01:00
Johannes Zellner
128a138e74 Remove the backup prefix from the key 2015-12-30 18:30:41 +01:00
Johannes Zellner
ca74b5740a Partly implement backup listing for s3 backend 2015-12-30 18:21:38 +01:00
Girish Ramakrishnan
a4ea693c3c update superagent
the latest superchanged changed the meaning of 'error'. Previously,
error implied a network error. With the latest superagent, error means
a REST api error i.e 4xx, 5xx are flagged as errors.

error && !error.response means network error
2015-12-15 09:53:37 -08:00
Girish Ramakrishnan
ee5bd456e0 set bucket and prefix to make migrate test pass 2015-11-09 22:45:07 -08:00
Girish Ramakrishnan
a5ef9ff372 Add getAllPaged to storage api 2015-11-08 22:41:13 -08:00
Girish Ramakrishnan
8df7f17186 load backup config from settingsdb 2015-11-07 22:06:09 -08:00
Girish Ramakrishnan
12200f2e0d split aws code into storage backends 2015-11-06 18:22:29 -08:00