Michael Eischer
b77e933d80
Convert underscore variable names to camelCase
2020-09-05 10:07:16 +02:00
Michael Eischer
d0329cf3eb
Adjust comments to match name of exported methods
2020-09-05 10:07:16 +02:00
Michael Eischer
dc31529fc3
Unindent else block after if block ending with a return statement
2020-09-05 10:07:16 +02:00
Michael Eischer
4784540f04
repository: Simplify worker group code
2020-09-05 10:07:16 +02:00
Michael Eischer
84ea2389ae
archiver_test: Only skip symlinks on windows
2020-09-05 10:07:16 +02:00
Michael Eischer
b4a7ce86cf
uint cannot be less than zero
2020-09-05 10:07:16 +02:00
Michael Eischer
7ee0964880
crypto: Remove unused error
2020-09-05 10:07:16 +02:00
Michael Eischer
f6f11400c2
restic: Remove unused variable value
2020-09-05 10:07:16 +02:00
Michael Eischer
e2dc5034d3
restic/file: Use FileType for all File constants
...
The data type of a variable is only carried on when using iota.
2020-09-05 10:07:16 +02:00
Michael Eischer
9a1b3cb5d9
restorer: Remove unused treeID struct member from test
2020-09-05 10:07:16 +02:00
Michael Eischer
b22655367c
integration_test: Replace fprintf without format string
2020-09-05 10:07:16 +02:00
Michael Eischer
068a3ce23f
Remove redundant return
2020-09-05 10:07:16 +02:00
Michael Eischer
ee05501ce7
archiver: Remove unused chmod function
2020-09-05 10:07:16 +02:00
Michael Eischer
014600bee6
archiver: Remove unused variable from test
2020-09-05 10:07:16 +02:00
Michael Eischer
d9a80e07b9
repository: Simplify index age calculation
2020-09-05 10:07:16 +02:00
Michael Eischer
d19f05c960
Use buf.String() instead of string(buf.Bytes())
2020-09-05 10:07:16 +02:00
Michael Eischer
460e2ffbf6
Collapse a few boolean operations
2020-09-05 10:07:14 +02:00
Michael Eischer
49b6aac3fa
Use !bytes.Equal instead of bytes.Compare !=0 to check for inequality
2020-09-05 10:06:23 +02:00
Michael Eischer
2f8335554c
Remove a few unused variables
2020-09-05 10:06:23 +02:00
Michael Eischer
37113282ca
Merge a few variable declaration and initializations
2020-09-05 10:05:34 +02:00
Michael Eischer
337725c354
Use sort.Strings
2020-09-05 10:05:34 +02:00
MichaelEischer
2ddb7ffb7e
Merge pull request #2255 from Kidswiss/tar
...
Fix dumping issues with / and the first sub level
2020-09-01 21:52:17 +02:00
Michael Eischer
81dcfea11a
dump: Mention tar output in command help text
2020-08-31 22:43:10 +02:00
MichaelEischer
55071ee367
Merge pull request #2859 from buschjost/stats-filter-by-tag-and-path
...
Add filter by tag and path to stats command
2020-08-31 22:11:01 +02:00
Michael Eischer
dcf9ded977
dump: Use slashes as path separators in tar on windows
...
This conversion is necessary as paths returned by filepath.Rel use the
operating-system native path separator
2020-08-30 18:26:50 +02:00
Michael Eischer
bcf44a9c3f
dump: Properly handle file paths without / prefix
...
filepath.Rel failed if the requested path did not start with a `/` e.g.
`restic` instead of `/restic`.
2020-08-30 18:25:42 +02:00
Oliver Buschjost
a7b4c19abf
Fix display of warning about ignored filters
2020-08-30 17:14:56 +02:00
Oliver Buschjost
d3fcfeba3a
Add filter by tag and path to stats command
2020-08-30 17:14:48 +02:00
Michael Eischer
e69449bf2c
dump: Add test for splitPath
2020-08-30 16:00:48 +02:00
Simon Beck
da4193c3ef
Add changelog
2020-08-30 16:00:48 +02:00
Simon Beck
fe6445e0f4
dump: Added unit tests for tar output
2020-08-30 16:00:48 +02:00
MichaelEischer
ea81a0e282
Merge pull request #2606 from middelink/fix-323
...
Add copy functionality.
2020-08-30 10:18:24 +02:00
Simon Beck
80a11960dd
dump: Always dump relative paths into tarballs
...
Tarballs should only contain relative paths.
2020-08-29 21:14:34 +02:00
Simon Beck
d6f739ec22
dump: Extract tar code to internal/dump
2020-08-29 21:14:34 +02:00
Simon Beck
b98598e55f
dump: Fix dumping issues with / and the first sub level
...
There was an issue that prevented the dump command from working
correctly when either:
* `/` contained multiple nodes (e.g. `restic backup /`)
* dumping a file in the first sublevel was attempted (e.g. `/foo`)
2020-08-29 21:14:29 +02:00
MichaelEischer
c34c731698
Merge pull request #2702 from MichaelEischer/fix-backup-dir-count
...
backup: Fix reporting of directory count in summary
2020-08-29 11:29:21 +02:00
Michael Eischer
412623b848
copy: Reuse buffer for downloaded blobs
2020-08-29 10:48:44 +02:00
Michael Eischer
bbe8b73f03
Update help text of backup command in docs
2020-08-29 10:48:44 +02:00
Michael Eischer
91e8d998cd
Add documentation for copy command
2020-08-29 10:48:44 +02:00
Michael Eischer
9a4796594a
integration tests: Fix checking of wrong snapshot
2020-08-29 10:48:44 +02:00
Michael Eischer
15374d22e9
integration tests: Add basic tests for copy command
2020-08-29 10:48:44 +02:00
Michael Eischer
88ad58d6cd
integration tests: Redirect directory diff into intermediate buffer
2020-08-29 10:48:44 +02:00
Michael Eischer
591a8c4cdf
integration tests: Deduplicate backup test-data setup code
2020-08-29 10:48:44 +02:00
Michael Eischer
ec9a53b7e8
copy: Mark and skip previously copied snapshots
...
Use the `Original` field of the copied snapshot to store a persistent
snapshot ID. This can either be the ID of the source snapshot if
`Original` was not yet set or the previous value stored in the
`Original` field. In order to still copy snapshots modified using the
tags command the source snapshot is compared to all snapshots in the
destination repository which have the same persistent ID. Snapshots are
only considered equal if all fields except `Original` and `Parent`
match. That way modified snapshots are still copied while avoiding
duplicate copies at the same time.
2020-08-29 10:48:44 +02:00
MichaelEischer
34a3adfd8d
Merge pull request #2898 from aawsome/add-iexclude-file
...
backup: Add --iexclude-file option
2020-08-28 21:59:16 +02:00
Alexander Weiss
9867c4bbb4
Add flag --iexclude-file to backup
2020-08-28 21:04:41 +02:00
MichaelEischer
efb4a981cf
Merge pull request #2904 from jasonccox/consistent-usage-strings
...
Update usage strings to put flags before args
2020-08-28 20:39:14 +02:00
Jason Cox
2447f3f110
Update usage strings to put flags before args
...
The standard UNIX-style ordering of command-line arguments places
optional flags before other positional arguments. All of restic's
commands support this ordering, but some of the usage strings showed the
flags after the positional arguments (which restic also parses just
fine). This change updates the doc strings to reflect the standard
ordering.
Because the `restic help` command comes directly from Cobra, there does
not appear to be a way to update the argument ordering in its usage
string, so it maintains the non-standard ordering (positional arguments
before optional flags).
2020-08-28 02:16:22 +00:00
Michael Eischer
b25978a53c
backup: Fix reporting of directory count in summary
...
Previously the directory stats were reported immediately after calling
`SaveDir`. However, as the latter method saves the tree asynchronously
the stats were still initialized to their nil value. The stats are now
reported via a callback similar to the one used for the fileSaver.
2020-08-27 22:43:51 +02:00
Michael Eischer
b0a8c4ad6c
copy: Only process each tree once
...
This speeds up copying multiple overlapping snapshots from one
repository to another, as we only have to copy the changed parts of
later snapshots.
2020-08-26 22:17:52 +02:00