Igor Fedorenko
5fa6dc53cb
Refactor: introduced restorer tree visitor
...
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
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
Alexander Neumann
fca4fe4459
backup: Disable status output for --quiet
2018-05-02 21:24:18 +02:00
Alexander Neumann
0e78ac92d8
Use new archiver code for backup
2018-04-28 22:08:11 +02:00
Alexander Neumann
a5c0cf2324
Add workaround for symlinked temp dir on darwin
...
Chdir to the tempdir, then use os.Getwd() to get the name that
filepath.Abs() uses (and stores in the Snapshot).
2018-04-25 14:42:45 +02:00
Alexander Neumann
38926d8576
Use new archiver code in tests
2018-04-25 14:42:45 +02:00
Alexander Neumann
b804279fe8
integration tests: Don't print anything to stdout
2018-04-22 11:37:05 +02:00
Alexander Neumann
4544a77172
Slightly increment size for TestIncrementalBackup
...
This should make the test more reliable, it should hit the accidental
"repo is has grown too much" way less often.
2018-04-01 13:49:42 +02:00
Bowen Song
34671d7c9b
Skip archiver.Scan before backup when --quiet is set
2018-03-20 20:44:10 +00:00
Alexander Neumann
dfb6d0fced
Reduce data for TestIncrementalBackup
2018-03-11 21:17:27 +01:00
Alexander Neumann
c6c1dccc53
Reduce data set for TestRestore
2018-03-11 21:10:37 +01:00
Alexander Neumann
279566bafe
Reduce dataset for integration tests
2018-03-11 21:07:47 +01:00
Alexander Neumann
c67a8452f7
Disable polynomial check for chunker for tests
2018-03-11 20:59:40 +01:00
Felix Lee
7b44fd0f9d
fix #1143
...
Backup was choosing a parent snapshot that had the same tags, which
makes backup unnecessarily slow when there are newer snapshots with
different tags.
There's no reason parent has to have the same tags.
This change makes backup choose the newest snapshot instead.
2017-10-05 11:48:26 -07:00
Herbert
033589a66b
Use rtest on these as well to keep codebase consistent
2017-10-02 17:48:08 +02:00
Herbert
3473c3f7b6
Remove all dot-imports
2017-10-02 15:06:39 +02:00
Ricardo Seriani
62ed776a8c
Change key rm command to key remove
...
Change key rm command to key remove, to follow manual and other commands
2017-08-17 11:03:26 -03:00
Alexander Neumann
d780b1eede
Rework withTestEnvironment
...
Switch from a function passed as a parameter to a cleanup function,
which is also executed when the test function panics, so no temporary
directories are left behind.
2017-07-24 21:32:34 +02:00
Alexander Neumann
23c903074c
Move restic package to internal/restic
2017-07-24 17:43:32 +02:00
Alexander Neumann
94b27e8933
Fix paths for tests
2017-07-23 14:39:57 +02:00
Alexander Neumann
6caeff2408
Run goimports
2017-07-23 14:21:03 +02:00
Alexander Neumann
83d1a46526
Moves files
2017-07-23 14:19:13 +02:00
Alexander Neumann
b63399d606
Move things around for gb
...
This moves all restic source files to src/, and all vendored
dependencies to vendor/src.
2016-02-20 17:31:20 +01:00
Alexander Neumann
a1440c819b
Make NoLock a global option
2015-11-13 12:33:59 +01:00
Alexander Neumann
6edb7e02d0
Allow restoring and listing without locking
2015-11-10 22:13:53 +01:00
Alexander Neumann
c79dcbd7c4
Allow checking a read-only repo with --no-lock
2015-11-10 21:41:22 +01:00
Alexander Neumann
acba82c8f7
Merge pull request #252 from restic/repack-blobs
...
WIP: Repack blobs
2015-11-09 20:57:57 +01:00
Alexander Neumann
1f9aea9905
fix test on windows, reset read-only flag
2015-11-08 22:41:45 +01:00
Alexander Neumann
742d69bf4d
Add another test for optimizing unused blobs
2015-11-08 22:38:17 +01:00
Alexander Neumann
5776b8f01c
remove ConvertIndex
2015-11-08 22:27:13 +01:00
Alexander Neumann
2e6eee991d
Add test for optimize command with old indexes
2015-11-08 22:21:08 +01:00
Alexander Neumann
c4fc7b52ae
Add 'optimize' command that repacks blobs
2015-11-08 21:10:03 +01:00
Alexander Neumann
ea41a1045f
Add integration test for error on readdirnames
2015-11-06 23:19:56 +01:00
Alexander Neumann
734ae7fcb8
Add test for corner case
...
It was observed that a restic repository still contained overlapping
indexes after `rebuild-index` has been called. This is caused by
instantly forgetting that blobs have already been saved once a full
index has been written during index rebuilding.
This commit adds a (failing) test that shows the behaviour.
2015-10-25 21:51:57 +01:00
Alexander Neumann
7b8e42a763
Silence rebuild-index tests
2015-10-25 21:51:46 +01:00
Alexander Neumann
6aed9f268b
Add command rebuild-index
2015-10-25 17:24:52 +01:00
Chapuis Bertil
c765688779
find command integration tests
2015-08-28 19:31:05 +02:00
Alexander Neumann
5cdcc99eba
Use array instead of hash for backend.ID
...
Since backend.ID is always a slice of constant length, use an array
instead of a slice. Mostly, arrays behave as slices, except that an
array cannot be nil, so use `*backend.ID` insteaf of `backend.ID` in
places where the absence of an ID is possible (e.g. for the Subtree of a
Node, which may not present when the node is a file node).
This change allows to directly use backend.ID as the the key for a map,
so that arbitrary data structures (e.g. a Set implemented as a
map[backend.ID]struct{}) can easily be formed.
2015-07-25 18:01:57 +02:00
Alexander Neumann
deaca157fe
restore: ignore errors
...
Also add a test for restoring a file that is owned by root. Closes #244 .
2015-07-25 12:59:59 +02:00
Alexander Neumann
cc34401152
Record exclude patterns in snapshot
...
This adds the exclude patterns used to create a backup in the snapshot,
so we can later compute statistics (like git does) on the data
structure, e.g. added/removed files etc. For that, we need the exclude
pattern.
2015-07-22 22:43:32 +02:00
Alexander Neumann
1da89253cf
Add include filter for restore
...
Include and exclude filter are mutually exclusive.
2015-07-20 19:21:01 +02:00
Alexander Neumann
c0337a2675
Add exclude filter to restorer and 'restore' command
2015-07-20 19:21:01 +02:00
Alexander Neumann
7fd52f9f57
Add exclude filter to archiver and 'backup' command
2015-07-20 19:21:01 +02:00
Alexander Neumann
54c4c29a89
Add checker and command 'check' to replace 'fsck'
2015-07-11 16:27:38 +02:00
Alexander Neumann
389ec9b101
Add tests for restore filter
2015-07-09 20:12:31 +02:00
Alexander Neumann
5ae04b6834
Add last integration tests, remove testsuite
2015-06-21 17:40:22 +02:00
Alexander Neumann
43d4558a90
Add test for backing up non-existing directories
2015-06-21 17:40:22 +02:00
Alexander Neumann
cfaf8ab8a6
Add integration test for key handling
2015-06-21 17:40:22 +02:00
Alexander Neumann
a99a460b32
Fix integration tests
2015-06-21 17:40:22 +02:00