rawtaz
58bd165253
Merge pull request #2581 from aawsome/multiple-hostnames
...
Allow multiple hostnames tags
2020-02-27 08:35:23 +01:00
Alexander Weiss
9a9101d144
Support specifying multiple host flags for various commands
...
The `dump`, `find`, `forget`, `ls`, `mount`, `restore`, `snapshots`,
`stats` and `tag` commands will now take into account multiple
`--host` and `-H` flags.
2020-02-26 22:17:59 +01:00
Lars Lehtonen
16b321b140
internal/restic: fix dropped test error
2020-02-12 13:32:45 -08:00
Ward Vandewege
69a0d0ee90
fix typos
2019-12-21 21:00:28 -05:00
rawtaz
da4473aba6
Merge pull request #2391 from kastenhq/refresh-lock-time
...
Update Lock.Time in lock.Refresh()
2019-11-26 21:44:29 +01:00
Leo R. Lundgren
4d2aa18273
Accept both singular and plural for --group-by ( #2330 )
2019-11-20 19:25:48 +01:00
Eric Hamilton
1596d06f8e
Update Lock.Time in lock.Refresh()
2019-09-04 11:38:35 -07:00
Alexandr Bruyako
38ea7ed4f6
remove unused code
2019-07-01 00:24:45 +03:00
Alexander Neumann
355db0bc29
windows: Use LastWriteTime for ctime and mtime
...
Windows does not have a concept of a `change time` in the sense as Unix
has it: the field `CreationTime` of the `Win32FileAttributeData` struct
is not updated when attributes or content is changed. So from now on
we're using the `LastWriteTime` as the `change time` on Windows.
2019-05-05 14:02:11 +02:00
Alexander Neumann
939f3e972c
node: Make sure year of all timestamps is valid
...
Sometimes restic gets bogus timestamps which cannot be converted to
JSON, because the stdlib JSON encoder returns an error if the year is
not within [0, 9999]. We now make sure that we at least record _some_
timestamp and cap the year either to 0000 or 9999. Before, restic would
refuse to save the file at all, so this improves the status quo.
This fixes #2174 and #1173
2019-04-24 16:39:36 +02:00
Alexander Neumann
18ec27a0da
Merge pull request #2243 from treymo/ls-length-2104
...
backend find: Check prefix length < snapshot IDs when searching
2019-04-23 09:41:19 +02:00
Jan Niklas Richter
733519d895
Refactor duplicate code for grouping snapshots
...
This commit is a followup to the addition of the --group-by flag for the
snapshots command. Adding the grouping code there introduced duplicated
code (the forget command also does grouping). This commit refactors
boths sides to only use shared code.
2019-04-22 14:57:53 +02:00
Trey Moore
5ac9c1157a
Prevent "slice bounds out of range" error if prefix is longer than snapshot IDs.
...
This includes tests as well as other tests for the backend_find.Find function. Issue #2104 .
2019-04-16 20:26:20 -07:00
Alexander Neumann
d51e9d1b98
Add []byte to repo.LoadAndDecrypt and utils.LoadAll
...
This commit changes the signatures for repository.LoadAndDecrypt and
utils.LoadAll to allow passing in a []byte as the buffer to use. This
buffer is enlarged as needed, and returned back to the caller for
further use.
In later commits, this allows reducing allocations by reusing a buffer
for multiple calls, e.g. in a worker function.
2019-04-13 13:38:39 +02:00
Alexander Neumann
203d775190
restic: Make JSON unmarshal for ID more efficient
...
This commit reduces several allocations in UnmarshalJSON() by decoding
the hex string directly in a single step.
2019-04-13 13:38:39 +02:00
Alexander Neumann
c1058005c3
Fix build on FreeBSD for Go < 1.12
2019-03-16 20:52:37 +01:00
Dmitri Goutnik
1d8b21cdad
Fix build on FreeBSD with Go 1.12
2019-03-06 09:41:49 -05:00
plumbeo
71891b340c
Support time ranges expressed in hours in snapshot retention policies
...
Make restic forget --keep-within accept time ranges measured in hours and choose
accordingly which snapshots to keep and which to forget. Add relative tests.
2018-11-26 14:27:42 +01:00
plumbeo
7486bfea5b
Extend custom Duration granularity to hours and add tests
2018-11-14 17:27:02 +01:00
Alexander Neumann
3ae2a79bdf
restic: Use local rand source instead of global one
2018-10-28 14:01:30 +01:00
Igor Fedorenko
da57302fca
restore: Removed legacy restore implementation
...
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
2018-10-14 17:37:30 +02:00
Jakob Unterwurzacher
e42d2d1da8
restore: suppress lchown errors when not running as root
...
Like "cp -a" and "rsync -a" do, only report lchown errors if we run
as root.
Like cp from GNU coreutils does, we check Geteuid() to determine if
we are running as root
( http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/copy.c#n3012 ).
On Windows, lchown errors are always reported.
Fixes https://github.com/restic/restic/issues/1766
2018-09-09 15:39:10 +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
Matthew Holt
6f5b0f3622
stat: Improve error message for bad snapshot ID ( fixes #1933 )
2018-08-08 16:49:36 -06:00
Alexander Neumann
abb18a830c
Fix test
2018-07-14 11:51:34 +02:00
Alexander Neumann
7ddf91b65c
Merge pull request #1772 from ifedorenko/restore-verify
...
Restore verify
2018-06-23 14:50:29 +02:00
Iku Iwasa
f080142137
Support NetBSD without fuse
2018-06-16 15:55:04 +09: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
060d8b57e0
Restructure TestApplyPolicy
2018-05-13 12:48:42 +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
64d98945a6
backup: Clean target paths before finding parent
...
This resolves an issue described in the forum where restic could not
find a parent snapshot if the target path ends with a slash:
https://forum.restic.net/t/new-archiver-code-please-test/623/23
2018-04-30 22:03:11 +02:00
Alexander Neumann
76b616451f
Remove unneeded code
2018-04-23 21:40:33 +02:00
Alexander Neumann
b6f98bdb02
node: Fill minimal info
2018-04-22 11:37:05 +02:00
Alexander Neumann
6a7c23d2ae
tree: Add convenience functions
2018-04-22 11:37:05 +02:00
Alexander Neumann
cc847a3d6d
tree: Improve error for pre-existing node
2018-04-22 11:37:05 +02:00
Alexander Neumann
baebf45e2e
FindLatestSnapshot: Use absolute paths
2018-04-22 11:37:05 +02:00
Alexander Neumann
fa4f438bc1
snapshot: Do not modify slice of paths
2018-04-22 11:37:05 +02:00
Alexander Neumann
4e0b2a8e3a
snapshot: correct error handling for filepath.Abs
2018-04-22 11:37:05 +02:00
Alexander Neumann
a472868e06
fs: Add TestChdir()
2018-04-22 11:37:05 +02:00
Alexander Neumann
09bd924710
Do not restore sockets, correct error handling
...
Closes #1730
2018-04-20 13:53:11 +02:00
Alexander Neumann
e68a7fea8a
check: Allow filling the cache during check
...
Closes #1665
2018-04-01 13:59:27 +02:00
Alexander Neumann
d3f9c8b362
forget: Print policy
2018-03-30 10:24:26 +02:00
Alexander Neumann
b9ada91054
Reduce data for TestCreateSnapshot
2018-03-11 21:42:39 +01:00
Alexander Neumann
c67a8452f7
Disable polynomial check for chunker for tests
2018-03-11 20:59:40 +01:00
Alexander Neumann
d8dcbc89d1
lock: Ignore invalid lock file
...
This commit fixes a bug introduced in
e9ea268847
: When an invalid lock is
encountered (e.g. if the file is empty), the code used to ignore that,
but now returns the error.
Now, invalid files are ignored for the normal lock check, and removed
when `restic unlock --remove-all` is run.
Closes #1652
2018-03-05 20:19:57 +01:00
Alexander Neumann
be0a5b7f06
Merge pull request #1649 from jasperla/solaris
...
Minimal set of patches to get restic working on Solaris
2018-03-05 20:00:17 +01:00
Jasper Lievisse Adriaanse
96311d1a2b
Add support for illumos/Solaris
...
This does come without xattr/fuse support at this point.
NB: not hooking up the integration tests as restic won't compile without
cgo with Go < 1.10.
2018-03-04 20:11:29 +00:00