Commit graph

1101 commits

Author SHA1 Message Date
Alexander Neumann
00e7a76ecc Merge branch 'iss358_pack_not_referenced_fix' of https://github.com/episource/restic into episource-358 2016-01-17 20:07:31 +01:00
Alexander Neumann
e689d499e7 Improve RandomReader 2016-01-17 19:46:48 +01:00
Philipp Serr
0fde09a866 Lock MasterIndex and InFlight store together
fixes: #358
2015-12-28 18:40:43 +01:00
Philipp Serr
e7bf936d2b Increase number of chunks and test repetitions 2015-12-28 18:33:28 +01:00
Philipp Serr
3d7f72311a Provoke unreferenced packs using fewer goroutines
TestParallelSaveWithDuplication has been reworked to provoke
unreferenced packs using fewer goroutines than before and create
only one bytes.Reader per blob. This reduces memory usage
significantly.

The following actions have been taken to keep the chance of provoking
unreferenced packs due to #358 high:
 * Interweaved processing of subsequent chunks
 * Delaying each goroutine by a few pseudo-randomly chosen nanoseconds
   (depending on the platform this will most probably only make the os
   yield execution to another thread): together with the interweaved
   processing of subsequent chunks, this ensures a minimalistic delay
   between processing of (some) duplicated chunks
 * Repeating the test 5 times with different seeds

On my test machine, the modified test provoked unreferenced packs 60
times in a row.
2015-12-28 18:33:26 +01:00
Philipp Serr
6a548336ec Add a test concurrently saving duplicated chunks
This commit adds an integration test, that calls Archiver.Save from
many goroutines processing several duplicated chunks concurrently.
The test asserts, that after all chunks have been saved, there are no
unreferenced packs in the repository.

The test has been checked to give the expected results:
 1) Running the test with maxParallel=1 (all chunks are processed
    sequentially) has been verified not to produce any unreferenced
    packs. Consequently the test passes.
 2) Running the test with unbounded parallelism (maxParallel=
    math.MaxInt32) has been verified to produce unreferenced packs
    all the time (at least 25 test runs). Consequently the test fails
    due to #358.

references: #358
2015-12-28 18:33:22 +01:00
Alexander Neumann
d3e7766f89 Merge pull request #380 from restic/PKGBUILD-update
Update PKGBUILD to reflect restic official version numbering
2015-12-27 22:07:28 +01:00
Florian Daniel
360193320f Update PKGBUILD to reflect restic official version numbering 2015-12-27 22:05:05 +01:00
Alexander Neumann
1f1b8e16a7 Add Code Quality Badge
Closes #379
2015-12-27 20:35:27 +01:00
Alexander Neumann
3abff7928c Merge pull request #375 from restic/fix-suid
Backup and restore setuid/setgid/sticky bits
2015-12-20 20:45:18 +01:00
Alexander Neumann
2976df2dc6 Call brew update before installing 2015-12-20 20:01:13 +01:00
Alexander Neumann
f49cb62812 Backup and restore setuid/setgid/sticky bits
A user discovered that restic does not restore setuid/setgid/sticky file
attributes. This commit fixes that. The mode is stored in the Go format
as an uint32: https://golang.org/pkg/os/#FileMode
2015-12-20 19:45:36 +01:00
Alexander Neumann
55d9c5f80c Merge pull request #364 from restic/fix-356
Allow reading all data
2015-12-06 21:55:21 +01:00
Alexander Neumann
d1ca986f55 Fix tests 2015-12-06 17:38:51 +01:00
Alexander Neumann
3ac1d0e4d1 add progress 2015-12-06 17:29:31 +01:00
Alexander Neumann
0e66a66bce read packs concurrently 2015-12-06 17:09:06 +01:00
Alexander Neumann
43a23f91a6 checker: add function to read and verify all data 2015-12-02 22:40:36 +01:00
Alexander Neumann
8d229bfd21 Make ReadCloser public 2015-12-02 22:37:58 +01:00
Alexander Neumann
04cd318f6c Merge pull request #362 from restic/improvements
Cleanups
2015-11-30 22:09:24 +01:00
Alexander Neumann
141d400b4a test: improvements 2015-11-29 14:54:20 +01:00
Alexander Neumann
b841eb4c54 crypto: check key for validity 2015-11-29 14:54:20 +01:00
Alexander Neumann
4f6bc754b8 MemBackend: Add Delete() and more debug 2015-11-29 14:53:02 +01:00
Alexander Neumann
26697a0223 Fix MemoryBackend GetReader() method 2015-11-29 14:52:19 +01:00
Alexander Neumann
480054bc3a MemoryBackend: handle config correctly, add tests for that 2015-11-29 14:52:19 +01:00
Alexander Neumann
538e5878a1 add debug logging to MemoryBackend 2015-11-29 14:52:19 +01:00
Alexander Neumann
9cb4e14327 add MemBackend and MockBackend 2015-11-29 14:52:19 +01:00
Alexander Neumann
da71da23d9 Add MockBackend 2015-11-29 14:52:19 +01:00
Alexander Neumann
0d5731383f Remove HashAppendWriter 2015-11-29 14:29:59 +01:00
Alexander Neumann
4fd7676e92 HashingWriter: Add documentation 2015-11-29 14:29:59 +01:00
Alexander Neumann
8209bb309b split out decryptReader and packerManager 2015-11-29 14:29:59 +01:00
Alexander Neumann
d4b873ca76 Repo: add documentation 2015-11-29 14:29:57 +01:00
Alexander Neumann
5b601f00b1 Add error checking 2015-11-29 14:25:57 +01:00
Alexander Neumann
2c95772a6a Update README, instruct users to always open an issue 2015-11-22 19:23:48 +01:00
Alexander Neumann
867fc5bd4b Merge pull request #354 from restic/fix-index
Save new packs in index atomically
2015-11-20 23:20:27 +01:00
Alexander Neumann
567de35df4 Save new packs in index atomically
This commit fixes a situation reported by a user where two indexes
contained information about the same pack without overlap, e.g.:

Index 3e6a32 contained:

    {
      "id": "c02e3b",
      "blobs": [
        {
          "id": "8114b1",
          "type": "data",
          "offset": 0,
          "length": 530107
        }
      ]
    }

And index 62da5f contained:

    {
      "id": "c02e3b",
      "blobs": [
        {
          "id": "e344f8",
          "type": "data",
          "offset": 1975848,
          "length": 3426468
        },
        {
          "id": "939ed9",
          "type": "data",
          "offset": 530107,
          "length": 1445741
        }
      ]
    }

This commit adds all blobs in a pack in one atomic operation so that
intermediate such as these do not happen.
2015-11-20 22:56:56 +01:00
Alexander Neumann
34bf70faea Merge pull request #352 from restic/rework-readme
Rework README
2015-11-13 23:48:17 +01:00
Alexander Neumann
6b9c8ffd14 Merge pull request #350 from restic/allow-read-only-ops
Allow check/restore read-only, without locking
2015-11-13 23:48:05 +01:00
Alexander Neumann
96061d2a2f Fix debug log message 2015-11-13 23:47:53 +01:00
Alexander Neumann
88b167cc10 Add note about unreleased code in the master branch 2015-11-13 12:41:47 +01:00
Alexander Neumann
a79fba13e1 Shorten README, remove options 2015-11-13 12:41:36 +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
6c54d3fa82 index: also mark old index as final on decode 2015-11-08 22:21:29 +01:00
Alexander Neumann
2e6eee991d Add test for optimize command with old indexes 2015-11-08 22:21:08 +01:00
Alexander Neumann
c59b12c939 Show a hint whech the checker finds an old index 2015-11-08 21:50:48 +01:00