Each obj.Stat() call adds another request to the S3 endpoint
for some commands a lot of ReadAt calls are made for the same
object in S3. This patch essentially cuts the number of calls
to S3 in this case in half. Speeding up the progress and lowering
costs to S3.
As we cannot reliably detect in advance if we can set ownership, permissions,
timestamps or ext attributes, execute ALL the requested changes before
returning the first error we found.
Report total errors at end of restore and stop printing entire stacktraces
where just the error message is sufficient.
Fixes #655
Remove target file, ignore non existing file errors.
Small memory saving: Only keep inodes around for files with a link count > 1.
(We will/can never be asked to restore a hardlinked file with one of the
files having a link count of 1.)
Closes #836
Rather complicated solution becaused I wanted to retain the streaming
character of the output, which means for json I have to manually add
headers and footers per snapshot scanned + a list around the whole
set.
As the json ouput is now partly handcrafted, add proper testing to catch
unintentional changes to the output, making it non-json compliant.
Closes #869
Implement filtering by using `FindFilteredSnapshots()` to iterate over the snapshots
Refactor cmd_ls' `PrintNode()` into format.go, reuse its pretty printing in both `find`
and `ls` commands.
Use contexts.
Implement filtering by using `FindFilteredSnapshots()` to iterate over the snapshots
Refactor cmd_snapshots' `PrintSnapshots()` so its pretty printing can be used from
both `forget` and `snapshots`.
Use contexts.
This helper function takes a set of filters and/or a list of snapshots
from the commandline. It returns a channel of *Snapshot.
When snapshot ids are given, they are checked for validity and their
corresponding Snapshots returned. The snapshot id "latest" is handled
special to return either the last snapshot (no filters) or the last
snapshot matching the filters.
When no arguments are given, the filters are applied over all available
snapshots and these are returned.
Set up a cancelble context in global options, hook it into the ctrl-C handler
for proper cancel propegation.
Bump up minimal requirement for Go to version 1.7 in documentation
and test-build files.
The layouter does not account for multi tags when determining the
need for ascii art.
36fd8178 2017-03-03 21:35:04 abuseio.polyware.nl NL /
A └──
vs
36fd8178 2017-03-03 21:35:04 abuseio.polyware.nl NL ┌── /
A └──
Add `HasPath(paths []string) bool` to Snapshot for testing if the
snapshot has at least the paths given to the function.
Reimplemented SamePaths(paths []string) so it does what the name implies,
compare if all given paths are in the snapshot.