Commit Graph
12 Commits
Author SHA1 Message Date
Christian Kemper a4261dcc9c Use path.Join to create the s3 object name within the bucket.
path.Join already automatically skips empty path segments when
joining, so this simplifies the s3Path code.
2016-10-02 16:56:07 -07:00
Christian Kemper 6eb97ca6cc Cleaned up the sftp parsing logic.
Simplified and cleaned up the sftp parsing logic. Added support to
path.Clean the directory. Added additional tests.
2016-02-21 10:50:36 -08:00
Christian Kemper c2716755f1 Added missing handle to the s3.Stat log message output 2016-02-21 09:59:27 -08:00
Christian Kemper 1f81865847 set Blocks and BlockSize in Attr using a default blocksize of 512 to address #442. 2016-02-14 13:14:08 -08:00
Christian Kemper f3f1404849 always use "restic" as the default prefix for parsing.
improved test error message to make it easier to find the problematic pattern
2016-02-14 11:26:46 -08:00
Christian Kemper 24b7514fe0 cleaner sharing of s3: and s3:// configuration 2016-02-14 09:45:58 -08:00
Christian Kemper 91dc14c9fc fix Hound warning 2016-02-14 09:27:00 -08:00
Christian Kemper 32c2cafa89 Simplify creation of the Config by moving it to a separate function. Simplify the parsing logic
by sharing the handling of s3: and s3://
2016-02-14 09:18:22 -08:00
Christian Kemper 74608531c7 strip off the trailing slash for the object prefix 2016-02-14 07:16:50 -08:00
Christian Kemper 48f85fbb09 replaced if-else chain with switch 2016-02-14 07:01:14 -08:00
Christian Kemper 535dfaf097 address first round of review comments 2016-02-14 06:40:15 -08:00
Christian Kemper 8f5ff379b7 Introduced a configurable object path prefix for s3 repositories.
Prepends the object path prefix to all s3 paths and allows to have multiple independent
restic backup repositories in a single s3 bucket.

Removed the hardcoded "restic" prefix from s3 paths.

Use "restic" as the default object path prefix for s3 if no other prefix gets specified.
This will retain backward compatibility with existing s3 repository configurations.

Simplified the parse flow to have a single point where we parse the bucket name and the prefix within the bucket.

Added tests for s3 object path prefix and the new default prefix to config_test and location_test.
2016-02-14 06:05:38 -08:00