Commit graph

23 commits

Author SHA1 Message Date
Alexander Neumann
26484d0c7b pipe: Ignore excluded directories
When top-level directories are ignored, they were still added to the
top-level Dir{} object. This commit ignores them.
2016-02-07 23:23:16 +01:00
Alexander Neumann
68db75b4e3 pipe/archiver: Add more debug messages 2016-02-07 23:22:06 +01:00
Alexander Neumann
9048eb676b pipe: join replaced paths with original path
When saving `/`, it was replaced with the contents, but without the
proper path. So `/` was replaced by [`boot`, `bin`, `home`, ...], but
without prefixing the entry name with the proper path.
2016-02-07 22:18:37 +01:00
Alexander Neumann
811dbfa52d Make TestWalkerPath absolute before walking 2016-02-07 19:34:02 +01:00
Alexander Neumann
c6a1f2e2f3 pipe: Handle special paths gracefully
This fixes handling special paths "." and "/". When such a path name is
found, it is replaced by the contents of the path before walking.
2016-02-07 19:30:00 +01:00
Alexander Neumann
604c27f001 Test pipe walker for invalid paths
It was discovered that when restic is instructed to save `/`, the tree
structures in the repository contain an invalid node.

When saving the dir `/home/user`, the following structure is created:

    snapshot
         -> tree
             nodes: ["user"]
             [...]

When the root directory `/` is saved, the structure is as follows:

    snapshot
         -> tree
             nodes: ["/"]
             [...]

This behavior is caused by the walker in pipe.go sending a node with the
name "." to the archiver, so this commit adds a test for invalid node
names.
2016-02-07 19:29:44 +01:00
Alexander Neumann
005c13ff05 pipe: make test platform-independent 2015-11-06 22:38:34 +01:00
Alexander Neumann
1569176e48 pipe: propagate errors properly 2015-11-06 19:41:57 +01:00
Alexander Neumann
9753c37e31 Remove dead code
This removes dead code (functions that aren't called) detected with
`deadcode`.
2015-07-26 14:56:34 +02:00
Alexander Neumann
7fd52f9f57 Add exclude filter to archiver and 'backup' command 2015-07-20 19:21:01 +02:00
Alexander Neumann
26e4d2e019 tests: Remove more flags 2015-06-28 13:52:22 +02:00
Alexander Neumann
5ae04b6834 Add last integration tests, remove testsuite 2015-06-21 17:40:22 +02:00
Alexander Neumann
861e1b9910 Add doc stubs to all the packages 2015-05-09 13:00:01 +02:00
Alexander Neumann
4f4f3c421a Use package "restic/test" 2015-04-09 21:15:48 +02:00
Alexander Neumann
b86786aec9 Do not archive non-existing items 2015-03-28 16:35:46 +01:00
Alexander Neumann
71a57537ef Report errors, ignore files and continue. Closes #108 2015-03-15 15:48:05 +01:00
Alexander Neumann
1bb82afcf6 Add tests for bug #101 2015-03-15 15:27:22 +01:00
Alexander Neumann
ab8b97c4ba Remove code duplication
The top-level tree is now handled by the DirWorkers
2015-03-08 21:06:51 +01:00
Alexander Neumann
ba892e1ec2 Refactor backup pipeline 2015-03-08 14:16:01 +01:00
Alexander Neumann
03bdbb064f Allow cancelling walker 2015-03-02 19:58:11 +01:00
Alexander Neumann
f167366be5 Add walk for trees, restructure 2015-03-02 19:58:06 +01:00
Alexander Neumann
f8f8107d55 wip 2015-02-15 15:17:24 +01:00
Alexander Neumann
2f1137bac4 Add pipe package 2015-02-15 15:09:26 +01:00