Commit graph

4257 commits

Author SHA1 Message Date
Quentin Bourgeois
5cc224e44a
Merge remote-tracking branch 'upsteam/master' 2018-08-26 20:05:02 +02:00
Alexander Neumann
896089976a Fix comment 2018-08-26 19:54:17 +02:00
Quentin Bourgeois
a563f87818
<docs/manual_rest: Fix broken link to restc Design page> 2018-08-26 01:46:38 +02:00
Alexander Neumann
de307ea2ab Merge pull request #1876 from restic/forget-explain
forget: Add --explain
2018-08-25 21:48:44 +02:00
Alexander Neumann
4bc904a527 Merge pull request #1780 from McKael/what-contains
Add options to 'find' for searching IDs (blobs, ...)
2018-08-25 21:46:25 +02:00
Alexander Neumann
5937b5b355 Add entry to changelog 2018-08-20 22:00:23 +02:00
Alexander Neumann
76387b6cd0 Remove old text table implementation 2018-08-20 22:00:23 +02:00
Alexander Neumann
9aa36a37c7 Vendor cmpopts 2018-08-20 21:47:51 +02:00
Alexander Neumann
9fd3796d93 forget: Display reasons why snapshots are kept
This change displays the reasons for keeping a snapshot in the table,
unless `--compact` is specified.
2018-08-20 21:47:51 +02:00
Mikael Berthe
93fa17b53f Add entry to changelog (new find flags) 2018-08-19 23:28:04 +02:00
Alexander Neumann
15ad0e5bc7 walk: Pass parent tree ID to WalkFunc 2018-08-19 23:28:04 +02:00
Mikael Berthe
1f27d17c0d walker.Walk: Pass parent tree-id to WalkFunc 2018-08-19 23:28:04 +02:00
Mikael Berthe
8af918a1e4 find: Add support for multiple patterns or objects 2018-08-19 23:28:04 +02:00
Mikael Berthe
bb5425a1d8 find: Add support for blobs, IDs and packs lookups
With --blob, --tree and --pack, the find command now lists the snapshots
that contain a specific tree or blob, or the snapshots that contain
blobs belonging to a given pack.
It also displays the pack ID a blob belongs to.

A list of IDs can be given, as long as the IDs are all of the same type.
2018-08-19 22:32:30 +02:00
Alexander Neumann
12246969db ui/table: Add small package for writing tables 2018-08-19 21:39:35 +02:00
Matthew Holt
9151eec24e Add changelog entry 2018-08-19 09:14:58 -06:00
Matthew Holt
22475729ce Select specific Node fields for listing 2018-08-19 09:03:47 -06:00
Matthew Holt
04c67d700d ls: Stream output when using --json option 2018-08-19 00:18:43 -06:00
Alexander Neumann
d708d607fa Merge pull request #1953 from kitone/ls-add-json
ls: Add JSON output support for restic ls cmd
2018-08-18 15:31:15 +02:00
Alexander Neumann
46f71f4c22 Improve changelog entry 2018-08-18 15:14:52 +02:00
kitone
48cc2f2188 fix: switch struct_type value to lower case 2018-08-18 14:57:50 +02:00
kitone
bd6e7c934c add changelog entry 2018-08-18 14:57:50 +02:00
kitone
7925217e25 ls: Add JSON output support for restic ls cmd 2018-08-18 14:57:50 +02:00
Alexander Neumann
401a564486 Merge pull request #1961 from mholt/statsoutput
stats: Show what was scanned and scanning mode used
2018-08-18 14:29:14 +02:00
Alexander Neumann
31176d212b doc: Add explanation for "processed" vs "added" 2018-08-18 14:26:57 +02:00
Matthew Holt
2d89311d49 stats: Show what was scanned and scanning mode used 2018-08-17 17:15:30 -06:00
Alexander Neumann
5a25ad1972 Update version in build.go 2018-08-17 21:17:26 +02:00
Alexander Neumann
79d3a18b31 release.go: Add version to global.go
Closes #1958
2018-08-17 21:17:10 +02:00
Alexander Neumann
89f17847ad Merge pull request #1955 from restic/fix-prune-1954
prune: Fix calculation for removed bytes
2018-08-14 22:30:59 +02:00
Alexander Neumann
1ab5703404 prune: Fix calculation for removed bytes 2018-08-14 22:06:05 +02:00
Alexander Neumann
49d95e9a50 Merge pull request #1949 from restic/add-self-update
Add command self-update
2018-08-13 22:02:34 +02:00
Alexander Neumann
7dff1a08d0 Merge pull request #1950 from ldelouw/master
Add RPM SPEC file to create restic packages on Fedora and RHEL
2018-08-13 22:00:18 +02:00
Alexander Neumann
5fee36fa84 Merge pull request #1941 from mholt/lsfilter
ls: Implement directory filter, optionally subfolders
2018-08-13 21:58:32 +02:00
Luc de Louw
b0211dff49 Small change for RHEL6 which does not know about the %license macro 2018-08-13 21:39:04 +02:00
Luc de Louw
0f6d21cf84 Add the SPEC file restic.spec to build RPMs
Tested on Fedora 28, RHEL 6 and 7
2018-08-13 21:39:04 +02:00
Alexander Neumann
10b5cf8f32 Add self-update to the docs 2018-08-12 23:56:06 +02:00
Alexander Neumann
ad5aec3f3b Add entry to changelog 2018-08-12 23:56:01 +02:00
Alexander Neumann
6e1a3987b7 Add 'self-update' command
This commit adds a command called `self-update` which downloads the
latest released version of restic from GitHub and replacing the current
binary with it. It does not rely on any external program (so it'll work
everywhere), but still verifies the GPG signature using the embedded GPG
public key.

By default, the `self-update` command is hidden behind the `selfupdate`
built tag, which is only set when restic is built using `build.go`. The
reason for this is that downstream distributions will then not include
the command by default, so users are encouraged to use the
platform-specific distribution mechanism.
2018-08-12 23:34:47 +02:00
Alexander Neumann
9630398e3b ls: Rework and simplify logic
This commit introduces two functions: withinDir() and
approachingMatchingTree()

Both bind the list of directories with a closure, so we don't need to
iterate over the list in the function passed to Walk(). This reduces the
indentation level and since we can just use return, we don't need the
breaks any more.

The case that len(dirs) == 0 can also be handled by the functions with a
return, which saves another indentation level.

The main function body of the function passed to Walk() was reduced to
three cases:

 * Within one of the dirs: Print the node, and if recursive operation is
   requested, directly return, so the walker continues recursive
   traversal

 * Approaching one of the dirs: don't print anything, but continue
   recursive traversal.

 * Nothing of the two: abort walking this branch of the tree.
2018-08-12 23:13:34 +02:00
Alexander Neumann
7e34de4c29 ls: Add comments 2018-08-12 22:18:44 +02:00
Alexander Neumann
ace5cc4ed3 ls: Only skip directory nodes
Special case for Walk(): When SkipDir is returned for a non-dir node,
the remaining nodes for the current tree are skipped. We don't want
that.
2018-08-12 22:02:59 +02:00
Alexander Neumann
7f617cfd7f ls: Use nodepath for filter 2018-08-12 22:01:38 +02:00
Alexander Neumann
0deb4e5994 ls: Check dirs before opening the repository
Users get feedback instantly, and before any expensive network calls
have been made.
2018-08-12 21:59:57 +02:00
Alexander Neumann
6b9dde3ce8 Merge pull request #1912 from askielboe/select-funcs
Support for different kinds of select functions
2018-08-12 19:26:36 +02:00
Alexander Neumann
c145b618d4 Add entry to changelog 2018-08-12 17:51:12 +02:00
Andreas Skielboe
b07bb3d8c3 Reject files excluded by name before calling lstat to improve scan speed
Adds a SelectByName method to the archive and scanner which only require
the filename as input, and can thus be run before calling lstat on the
file. Can speed up scanning significantly if a lot of filename excludes
are used.
2018-08-12 17:51:12 +02:00
Alexander Neumann
9b513312e2 Merge pull request #1946 from restic/fix-1945
Remove truncated files from cache
2018-08-12 17:23:56 +02:00
Alexander Neumann
bf26a3ed57 Merge pull request #1948 from restic/update-build-go
Update build.go
2018-08-12 17:18:11 +02:00
Alexander Neumann
77a8d931b8 Update build.go 2018-08-12 15:44:13 +02:00
Matthew Holt
11ce572894 Fix bug where some folder listings were empty 2018-08-11 17:17:43 -06:00