Alexander Neumann
d7baa67acb
snapshots: Don't print empty line for --compact
...
Closes #2038
2018-10-13 20:17:34 +02:00
Alexander Neumann
167397c18c
Set development version for 0.9.3
2018-10-13 13:48:31 +02:00
Alexander Neumann
be36c5f150
Add version for 0.9.3
2018-10-13 13:48:31 +02:00
Johannes Hertenstein
277cba4b32
Catch errors when walking cache directories
2018-10-08 15:47:34 +02:00
Johannes Hertenstein
ed651df19b
Use correct method for joining paths
2018-10-08 15:47:08 +02:00
Johannes Hertenstein
641dc65e6e
Output directory size in cache command
2018-10-07 14:37:51 +02:00
Daniel Bretoi
966e5a5575
use latest instead of newest in forget language
2018-10-06 12:02:22 -07:00
Alexander Neumann
5dbef3712e
Merge pull request #2027 from j6s/feature.cache-dir-information
...
Print base directory with cache command
2018-10-06 12:40:48 +02:00
Johannes Hertenstein
9b8deb51ba
Print base directory with cache command
2018-10-05 21:23:57 +02:00
Johannes Hertenstein
0916ff71bd
Add defaults to command line help of --cache-dir
2018-10-04 19:50:05 +02:00
Alexander Neumann
585a5e3416
Use --host
for all commands, deprecate --hostname
2018-10-03 14:12:35 +02:00
Alexander Neumann
fb31d66951
backup: Improve error message for invalid pattern
2018-10-03 11:12:51 +02:00
Stefano Fancello
e2da0a416c
Expand Glob (wildcards character) in paths in file in --files-from
2018-10-03 10:37:35 +02:00
Alexander Neumann
6d53e767d5
cache: Print message when new cache is created
...
Sometimes, users run restic without retaining the local cache
directories. This was reported several times in the past.
Restic will now print a message whenever a new cache directory is
created from scratch (i.e. it did not exist before), so users have a
chance to recognize when the cache is not kept between different runs of
restic.
2018-08-29 22:01:10 +02:00
Quentin Bourgeois
a065ada46a
Make generated man pages more easy to read with items
...
Allow Cobra to output a more list items friendly format, this make
reading of the documentation more easily using information from
manpages.
2018-08-27 17:42:54 +02:00
Alexander Neumann
896089976a
Fix comment
2018-08-26 19:54:17 +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
76387b6cd0
Remove old text table implementation
2018-08-20 22:00:23 +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
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
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
kitone
48cc2f2188
fix: switch struct_type value to lower case
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
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
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
5fee36fa84
Merge pull request #1941 from mholt/lsfilter
...
ls: Implement directory filter, optionally subfolders
2018-08-13 21:58:32 +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
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
Matthew Holt
11ce572894
Fix bug where some folder listings were empty
2018-08-11 17:17:43 -06:00
Matthew Holt
7a468d1226
Speed up nonrecursive queries; include exact filter match
2018-08-11 16:18:09 -06:00
Matthew Holt
00e2fd8b5f
Apply feedback and use SkipNode
2018-08-11 15:25:22 -06:00
Matthew Holt
ac3bd6b2eb
Replace Exitf with errors.Fatalf
2018-08-10 22:15:33 -06:00
Matthew Holt
156d85a29b
Minor fixes/tweaks; add docs
2018-08-10 22:10:02 -06:00
Matthew Holt
8c146eac4b
ls: Implement directory filter, optionally subfolders
2018-08-10 21:41:38 -06:00
Matthew Holt
6f5b0f3622
stat: Improve error message for bad snapshot ID ( fixes #1933 )
2018-08-08 16:49:36 -06:00
Alexander Neumann
3422c1ca83
Merge pull request #1729 from mholt/stats
...
Implement `restic stats` command to get more info about a repository
2018-07-31 23:24:36 +02:00
Matthew Holt
f6b2731aa5
stats: Add manual doc, improve -h doc
...
Also rename files-by-content to files-by-contents, once and for all
2018-07-31 22:54:10 +02:00
Alexander Neumann
3678ec9ad8
Print message for password being read from stdin
...
Closes #1911
2018-07-31 20:21:18 +02:00
Alexander Neumann
12c797700e
make statsWalkSnapshot return a function
2018-07-27 21:44:59 +02:00
Matthew Holt
daca9d6815
Consolidate mode flags; use new Walk function
2018-07-27 21:27:40 +02:00
Matthew Holt
930602a444
Update comment now that question was answered
2018-07-27 21:27:39 +02:00
Matthew Holt
acb05e7855
Fix filepath uniqueness bug for blobs-per-file mode
2018-07-27 21:27:39 +02:00
Matthew Holt
a7b95d716a
Implement four counting modes
2018-07-27 21:27:39 +02:00
Matthew Holt
925b542eb0
Count unique files by blob sequence rather than tree ID
2018-07-27 21:27:39 +02:00
Matthew Holt
f7659bd8b0
stats: Initial implementation of stats command
2018-07-27 21:27:39 +02:00
Alexander Neumann
f715bef82f
Merge pull request #1899 from garrmcnu/check-cache-dir
...
check: Use --cache-dir argument
2018-07-22 21:03:52 +02:00
Garry McNulty
7603ab7ac1
check: Update --cache-dir argument handling based on code review comments
...
The temporary cache directory is created in the specified directory, or
if not specified in the default temporary directory.
2018-07-22 18:24:11 +01:00
Garry McNulty
f1f69bc648
check: Use --cache-dir argument
...
Closes #1880
2018-07-20 20:51:20 +01:00
Alexander Neumann
fb74de6360
Return an error when exclude files cannot be read
2018-07-18 21:39:07 +02:00
Alexander Neumann
b511f4dce2
Improve help message for check
2018-07-05 22:19:08 +02:00
Mikael Berthe
fbf8073dfc
Fix find -i (case-insensitive search)
2018-06-24 19:35:11 +02:00
Alexander Neumann
7ddf91b65c
Merge pull request #1772 from ifedorenko/restore-verify
...
Restore verify
2018-06-23 14:50:29 +02:00
Alexander Neumann
8dae2de2ce
Merge pull request #1858 from restic/fix-1857
...
Allow excluding files with $ via --exclude-file
2018-06-22 21:22:23 +02:00
Alexander Neumann
025ec9dff5
Allow excluding files with $ via --exclude-file
...
Previously it wasn't possbile to exclude files with a literal dollar
sign (`$`) via exclude files, now users can write `$$` for that.
2018-06-22 20:46:04 +02:00
David Roman
2384c1cee7
Ignore ExcludeOtherFs if Stdin is true
...
Closes: #1807
2018-06-21 23:12:38 +02:00
Steve Kriss
5088905502
add JSON output support for restic key list cmd
...
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-06-18 15:26:26 -07:00
Iku Iwasa
f080142137
Support NetBSD without fuse
2018-06-16 15:55:04 +09:00
Igor Fedorenko
e206680947
restore: New --verify flag to verify restored files content
...
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
2018-06-11 07:57:22 -04:00
Igor Fedorenko
5fa6dc53cb
Refactor: introduced restorer tree visitor
...
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
2018-06-11 07:57:22 -04:00
Igor Fedorenko
26be094f28
Refactor: moved restorer to separate package
...
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
2018-06-11 07:57:22 -04:00
Alexander Neumann
321efec60c
Fix integration tests on Windows
2018-06-10 00:00:22 +02:00
Alexander Neumann
8f26fe271c
ls: Use walker for ls
2018-06-09 23:35:20 +02:00
Alexander Neumann
081743d0a5
find: Use walker.Walk
2018-06-09 23:35:20 +02:00
Alexander Neumann
ce01ca30d6
find: Correct tree pruning optimization
...
The `find` command will now take care to only mark trees as "not found"
when the pattern couldn't be found within any subtree.
Closes #1825 , #1823
2018-06-09 18:59:13 +02:00
Alexander Neumann
e2d347a698
find: Use OS independent slash-based format
2018-06-09 18:58:13 +02:00
Alexander Neumann
42ebb0a0a6
backup: Parse timestamp earlier
2018-06-09 18:21:12 +02:00
Alexander Neumann
bfd923e81e
rclone: Respect bandwith limits
2018-05-22 20:48:17 +02:00
Alexander Neumann
8d9d218d1c
list: Improve error message
...
Before:
$ restic list
Fatal: type not specified
After:
$ restic list
Fatal: type not specified, usage: list [blobs|packs|index|snapshots|keys|locks]
Closes #1783
2018-05-17 19:41:56 +02:00
Mikael Berthe
a868a30f4d
Fix restic backup --one-file-system /
...
This patch should fix the following panic when trying to backup the
root filesystem with thre --one-file-system flag:
% restic backup --one-file-system /
(...)
panic: item /, device id 2082 not found, allowedDevs: map[/:2082]
2018-05-16 13:44:14 +02:00
Alexander Neumann
cc627e832b
Add custom Duration type
2018-05-13 12:48:42 +02:00
Alexander Neumann
5a0f0e3faa
Add support for keeping a range of snapshots
2018-05-13 12:48:42 +02:00
Matthew Holt
b52f2aa9a4
forget: Add policy to keep snapshots before a date
2018-05-13 12:48:10 +02:00
Alexander Neumann
159badf5ba
Merge pull request #1778 from restic/fix-1771
...
archiver: Improve error handling
2018-05-13 00:13:54 +02:00
Alexander Neumann
903a3a31dc
Merge pull request #1776 from restic/fix-1775
...
Always use cleaned path for excludes
2018-05-13 00:13:52 +02:00
Alexander Neumann
581c62ee72
archiver: Improve error handling
...
This commit changes how the worker goroutines for saving e.g. blobs
interact. Before, it was possible to get stuck sending an instruction to
archive a file or dir when no worker goroutines were available any more.
This commit introduces a `done` channel for each of the worker pools,
which is set to the channel returned by `tomb.Dying()`, so it is closed
when the first worker returned an error.
2018-05-12 23:55:54 +02:00
Alexander Neumann
ef7747313d
backup: Use absolute paths for allowed devices
2018-05-11 21:32:44 +02:00
Alexander Neumann
18d4ac2fd9
backup: Always use cleaned path for excludes
2018-05-11 21:32:41 +02:00
Alexander Neumann
9180e2c48a
Remove unneeded file excludes
2018-05-11 21:26:10 +02:00
Gaige Lama
d3c0bd6d0e
Fix small typo
...
"explicitely" should be "explicitly"
2018-05-11 10:55:12 -04:00
Mikael Berthe
ffc276a603
cat: Do not display a stack trace
...
Don't show a stack trace when "restic cat snapshot" is invoked with
invalid/nonexistent IDs.
2018-05-10 19:22:46 +02:00
Alexander Neumann
fca4fe4459
backup: Disable status output for --quiet
2018-05-02 21:24:18 +02:00
Alexander Neumann
d0974c155d
backup: Tune user interface a bit
...
Make non-verbose mode a bit more verbose.
2018-05-01 22:18:32 +02:00
Alexander Neumann
8026e6fdfb
Merge pull request #1749 from restic/add-cache-cmd
...
Add 'cache' command to list and cleanup cache dirs
2018-05-01 21:25:52 +02:00
Alexander Neumann
f928aeec34
Add 'cache' command
2018-05-01 16:27:44 +02:00
Alexander Neumann
f77bc0fae8
Use textfile.Read() to read files
...
This converts the text to UTF-8 and removes a Byte Order Mark.
2018-05-01 16:25:53 +02:00
Alexander Neumann
d8bbe5dc84
Print repository ID after opening
2018-04-30 14:19:07 +02:00
Alexander Neumann
d926b9fd80
Add profile build flag
2018-04-30 14:19:04 +02:00
Alexander Neumann
4ba8d40282
Add block profile option
2018-04-30 14:18:45 +02:00