Alexander Neumann
2424012d75
Add 'diff' command
2017-12-03 18:33:35 +01:00
Alexander Neumann
88607fc625
Correctly format all node types
2017-12-03 17:38:55 +01:00
Alexander Neumann
ad82781743
Reenable cache
...
In 6341c7d72c
, the cache was accidentally
disabled due to a bug, this commit reenables the cache.
2017-12-03 15:52:57 +01:00
George Armhold
d886cb5c27
replace ad-hoc context.TODO() with gopts.ctx, so that cancellation
...
can properly trickle down from cmd_*.
gh-1434
2017-12-03 07:22:14 -05:00
Alexander Neumann
2579fe6b7b
Ignore SIGPIPE
...
Handling SIGPIPE made restic abort when a TCP connection was reset by a
server. This happened on DigitalOcean Spaces, which uses the s3 backend.
2017-11-30 21:23:43 +01:00
Alexander Neumann
eddb8549ef
backup: By default, do not save the access time
...
This can be re-enabled with `--with-atime`.
2017-11-28 21:31:35 +01:00
Alexander Neumann
2567026ccb
Merge pull request #1447 from fawick/fixMultipleRejectIfPresent
...
Fix multiple rejectIfPresent cancelling each other
2017-11-28 19:20:29 +01:00
Alexander Neumann
0cc8fc6f18
Merge pull request #1431 from n0npax/master
...
fix #1411
2017-11-27 21:54:06 +01:00
Fabian Wickborn
27fadd2c6e
Document approach for multiple reject-if-present test
2017-11-27 21:38:15 +01:00
Alexander Neumann
dc38265b54
Merge pull request #1436 from restic/remove-old-cache
...
Remove old cache directories
2017-11-27 21:37:05 +01:00
Fabian Wickborn
1ea518d5ef
cmd/restic: Use a dedicated cache for each rejectIfPresent
2017-11-27 17:33:53 +01:00
Fabian Wickborn
901cd5edef
cmd/restic: Add test for rejectIfPresent bug
...
All RejectFuncs returned by rejectIfPresent share the same rejection
cache and hence might cancel each other out.
2017-11-27 17:26:19 +01:00
Alexander Neumann
35a5307db3
Merge pull request #1415 from armhold/signals
...
also handle SIGPIPE in cleanup routines
2017-11-24 21:28:08 +01:00
Alexander Neumann
6341c7d72c
cache: Add option to remove old cache dirs
2017-11-24 20:53:28 +01:00
Alexander Neumann
fa893ee477
cache: Add detection code for old cache dirs
2017-11-24 20:53:26 +01:00
n0npax
b12bba4e2a
fix #1411
...
replace panic during index save with fatal error
2017-11-19 11:40:47 +01:00
George Armhold
0ed2401711
exit 1 if received signal is other than SIGINT
...
send cleanup msg to stderr, not stdout
gh-1413
2017-11-09 07:16:01 -05:00
George Armhold
c347431907
also handle SIGPIPE in cleanup routines
...
fixes gh-1413: restic fails to cleanup locks when bash pipeline fails
2017-11-05 07:14:27 -05:00
Björn Ketelaars
f63d7048f9
Fix test failing on OpenBSD #1307
...
Is seems that #1307 is similar to #1087 , which describes a comparable
observation on Apple's new filesystem. #1389 Has been committed and
fixes the problem on Darwin.
Although I'm not sure if the root cause of the issue is the same the
solution is similar for OpenBSD, and leverages #1389 .
2017-11-05 07:27:58 +01:00
Alexander Neumann
526aaca6f5
Merge pull request #1389 from wojas/fix-modtime-tests-on-apfs
...
Fix modtime tests on APFS: allow 1us difference
2017-10-29 14:20:40 +01:00
Konrad Wojas
f3016a9096
Darwin test fix: allow 1μs timestamp difference
...
On Darwin, allow a 1μs difference in restored timestamps, because
macOS <10.13 cannot restore with nanosecond precision and the current
version of Go (1.9.2) does not yet support the new syscall required
for this. (#1087 #1389 )
2017-10-29 20:48:07 +08:00
Zlatko Čalušić
134f834c60
Use lowercase in messages from check/tag commands, too
2017-10-27 21:06:34 +02:00
Konrad Wojas
c5da90a5b7
Add --last flag to snapshots command
...
Add --last flag to snapshots command to only show the last entry for any
(hostname, paths) combination.
This makes it easier to check when various paths were last backed up.
2017-10-26 14:02:29 +08:00
Alexander Neumann
8d37b723ca
Upadte vendored dependencies
2017-10-22 10:07:36 +02:00
TobyLL
9e3dde8ec7
Fix whitespace
2017-10-19 15:52:06 +01:00
TobyLL
9dba182e51
Ignore comments (lines starting with #) in the --files-from file
2017-10-19 15:48:22 +01:00
Alexander Neumann
beaf55f1fc
dump: Allow absolute paths
2017-10-16 20:22:01 +02:00
Alexander Neumann
0e7281eb71
Merge pull request #1346 from fawick/cmdCatFile
...
Add dump sub-command for dumping files to stdout
2017-10-16 20:13:44 +02:00
Alexander Neumann
897c923cc9
Retry failed backend requests
2017-10-14 15:56:25 +02:00
Alexander Neumann
67193e3deb
Improve error message when creating lock failed
2017-10-14 15:56:25 +02:00
Fabian Wickborn
d1d9c3f9d7
Renamed cmd_catfile.go to cmd_dump.go
2017-10-14 13:55:21 +02:00
Fabian Wickborn
cd5cbe0910
Rename debug dump related variable and run function
2017-10-14 13:55:00 +02:00
Fabian Wickborn
814e992c0b
Rename subcommand catfile to dump
2017-10-14 11:34:04 +02:00
Fabian Wickborn
87d084e18c
Add subcommand dump
2017-10-12 20:24:34 +02:00
Alexander Neumann
f2314b26ba
Move 'dump' to 'debug dump'
2017-10-12 20:18:45 +02:00
Alexander Neumann
74dcf41f25
Disable 'dump' for non-debug builds
2017-10-12 20:14:48 +02:00
rmdashrf
32637a0328
Basic rate limiting implementation.
...
Added `--limit-upload` and `--limit-download` flags to rate limit
backups and restores.
2017-10-11 20:01:20 -07:00
Alexander Neumann
c5553ec855
Merge pull request #1276 from fawick/supply_ca_cert
...
Add REST backend option to use CA root certificate
2017-10-08 09:47:23 +02:00
Alexander Neumann
bb3ed54291
Merge pull request #1337 from mungomat/fuse_updateRepo
...
fuse: mount and backup in parallel (#1330 )
2017-10-08 09:45:28 +02:00
Tobias Klein
02200acad0
fuse: mount and backup in parallel ( #1330 )
2017-10-07 11:48:48 +02:00
Alexander Neumann
1a2d190bdb
Merge pull request #1334 from felix9/backup_tags
...
backup should use latest parent regardless of tags
2017-10-07 10:45:02 +02:00
Fabian Wickborn
f0f17db847
Cache evaluated directories in isExcludedByFile
...
Fixes #1271 .
2017-10-06 22:11:22 +02: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
Fabian Wickborn
69a6e622d0
Add REST backend option to use CA root certificate
...
Closes #1114 .
2017-10-04 22:14:10 +02:00
Alexander Neumann
5d1c1f721e
Merge pull request #1324 from antonlindstrom/password-feedback
...
Add password successful feedback
2017-10-04 21:31:24 +02:00
Alexander Neumann
cdef55bb88
Merge pull request #1312 from hgfischer/issue-1119
...
nit: please remove dot imports #1119
2017-10-04 21:01:40 +02:00
Anton Lindstrom
a7baea0522
Output password successful on terminal stdout
...
This removes the conditions that checks if the password is supplied
through environment variable or file and outputs password is successful
on terminal and when --quiet is not supplied.
2017-10-04 14:55:04 +02:00
Anton Lindstrom
55e6003749
Add password successful feedback
...
This adds some feedback when entering the password on the command line.
When the password is entered and supplied through stdin (and stdout is a
terminal) then the a message saying `password is correct` if correct is
printed.
2017-10-04 13:45:05 +02:00
Alexander Neumann
657a1d75af
snapshots: Add short ID to JSON output
...
We're using the short ID in all output to users, so it should also be
included in the JSON output of the `snapshots` command.
2017-10-03 15:24:09 +02:00
Anton Lindstrom
d46314648e
Add explicit OK output to check command
...
This adds additional output to the check command when no errors were
found. It means that when all checks have been completed, the following
output is displayed:
No errors were found
The output is added to make sure that it is easier to understand that no
errors were found.
Full example output:
Create exclusive lock for repository
Load indexes
Check all packs
Check snapshots, trees and blobs
No errors were found
2017-10-03 12:57:51 +02:00
Alexander Neumann
e45011af57
Merge pull request #1304 from jannickfahlbusch/showAmountOfSnapshots
...
Show the number of snapshots
2017-10-03 12:41:47 +02:00
Alexander Neumann
fb09884893
Merge pull request #1311 from felix9/dump-no-trees
...
"dump" command no longer has a "trees" option
2017-10-03 12:40:24 +02:00
Alexander Neumann
d1eecafa63
Merge pull request #1314 from jannickfahlbusch/fixTypo
...
Fix typo in comment
2017-10-03 12:39:24 +02:00
Alexander Neumann
034b0b8040
forget: Run prune for manually forgotten snapshots
2017-10-03 11:56:13 +02:00
Jannick Fahlbusch
3dcacb3730
Fix typo in comment
2017-10-02 18:19:22 +02:00
Herbert
033589a66b
Use rtest on these as well to keep codebase consistent
2017-10-02 17:48:08 +02:00
Jannick Fahlbusch
e46a647c45
Just print the number of snapshots
2017-10-02 17:05:59 +02:00
Herbert
3473c3f7b6
Remove all dot-imports
2017-10-02 15:06:39 +02:00
Jannick Fahlbusch
2f10e25738
Show the amount of snapshots
2017-10-01 17:14:54 +02:00
Felix Lee
555bd257bd
dump command no longer has 'trees' option
2017-10-01 08:04:52 -07:00
Alexander Neumann
dad1c87afe
Rework generation of manpages and completion files
...
This commit removes the `manpages` and `autocomplet` commands and
replaces them with the more generic `generate` command. Also, zsh
completion file support was added.
2017-09-26 13:12:12 +02:00
Alexander Neumann
56fccecd06
prune: Repack mixed pack files
2017-09-24 21:54:53 +02:00
Alexander Neumann
62ba9f1950
check: Disable cache by default
2017-09-24 21:54:53 +02:00
Alexander Neumann
610b676444
Automatically exclude current restic cache
2017-09-24 21:54:53 +02:00
Alexander Neumann
9be24a1c9f
Add cache
...
This commits adds rudimentary support for a cache directory, enabled by
default. The cache directory is created if it does not exist. The cache
is used if there's anything in it, newly created snapshot and index
files are written to the cache automatically.
2017-09-24 21:54:53 +02:00
Fabian Wickborn
ea1ab96749
Always sort snapshots lists ascending by timestamp
...
Fixes #1219 .
2017-09-24 13:01:13 +02:00
Alexander Neumann
9c6b7f688e
Merge pull request #1270 from restic/sftp-allow-password-prompt
...
sftp: Allow password entry
2017-09-23 22:13:04 +02:00
Alexander Neumann
fb9729fdb9
sftp: Allow password entry
...
This was a bit tricky: We start the ssh binary, but we want it to ignore
SIGINT. In contrast, restic itself should process SIGINT and clean up
properly. Before, we used `setsid()` to give the ssh process its own
process group, but that means it cannot prompt the user for a password
because the tty is gone.
So, now we're passing in two functions that ignore SIGINT just before
the ssh process is started and re-install it after start.
2017-09-23 11:43:33 +02:00
Alexander Neumann
45a09c76ff
Allow suspending SIGINT handler
2017-09-23 11:12:56 +02:00
Dmitriy Morozov
ae60188eb9
Add --compact option to forget
2017-09-22 16:32:59 -07:00
Alexander Neumann
e7de3b5f9d
Merge pull request #1266 from JaCoB1123/document_hostname_option
...
Add note about rescan to hostname flag (fixes #1221 )
2017-09-22 15:40:24 +02:00
Jan Bader
727fb6eabe
Add note about rescan to hostname flag ( fixes #1221 )
2017-09-22 14:29:04 +02:00
Alexander Neumann
a4577769ae
Merge pull request #1262 from mafgh/bytes
...
fix duplicate bytes in prune output
2017-09-22 11:59:10 +02:00
Stefan Völkel
7f927d4774
fix duplicate bytes in prune output
2017-09-22 10:07:24 +02:00
Tobias Klein
1a83a739dc
fuse: added symlink 'latest' to snapshots-dir
2017-09-21 16:41:20 +02:00
Alexander Neumann
d7e644272f
prune: Add plausibility check
2017-09-19 10:50:07 +02:00
Alexander Neumann
fca9a523e9
Merge pull request #1241 from restic/fix-timestamp-check
...
Use .Equal() instead of == for time.Time
2017-09-16 14:54:26 +02:00
Alexander Neumann
a60e751217
Use .Equal() instead of == for time.Time
...
Closes #1238
2017-09-15 20:57:35 +02:00
Alexander Neumann
81c5d8a968
Correct bash completion file path
2017-09-15 20:45:16 +02:00
Alexander Neumann
c8c01a5cae
Merge pull request #1223 from mrzv/snapshots-compact
...
Add --compact option to snapshots
2017-09-13 14:02:31 +02:00
Alexander Neumann
0f25ef9498
Merge pull request #1230 from shayneholmes/update-short-help
...
Update style in short help commands
2017-09-11 22:25:31 +02:00
Alexander Neumann
36eaa22ed0
Merge pull request #1205 from mungomat/backup_time
...
Backup time
2017-09-11 19:01:41 +02:00
Shayne Holmes
9eb39cef05
Capitalize short help commands
...
Unify existing Cobra help command, and git-help's style.
2017-09-11 09:32:44 -07:00
Shayne Holmes
ee6150f67c
Change short help messages to imperative voice
...
Unify the output of `restic help`.
2017-09-11 09:26:13 -07:00
Alexander Neumann
b1af544b1d
Merge pull request #1224 from restic/improve-exclude-caches
...
Allow multiple exclude-if-present
2017-09-11 17:31:24 +02:00
Dmitriy Morozov
7a221f2473
Run changes through gofmt
2017-09-10 15:09:28 -07:00
Dmitriy Morozov
bdbe956c5c
Add --compact option to snapshots
...
With --compact, snapshots doesn't list directories and puts all tags on a single
line. This way each snapshot takes up exactly one line.
2017-09-10 13:06:43 -07:00
Alexander Neumann
b6aeea425b
Merge pull request #1196 from mungomat/forget_groupByTagsOnly
...
forget: group-by-tags-only
2017-09-10 20:52:15 +02:00
Alexander Neumann
a8aa4eb06c
Rename parameter filename -> path
2017-09-10 20:28:21 +02:00
Alexander Neumann
0b2947dedb
Add test for rejectByPattern
2017-09-10 15:31:58 +02:00
Alexander Neumann
47ddd34266
Improve test
2017-09-10 15:20:41 +02:00
Alexander Neumann
2fdca5d310
Improve debug message
2017-09-10 15:16:05 +02:00
Alexander Neumann
e5d4e33509
Improve error message if no targets specified
2017-09-10 15:14:11 +02:00
Alexander Neumann
e117f613af
Move device test into new RejectFunc
2017-09-10 15:13:40 +02:00
Alexander Neumann
0dfdf02885
Rework pattern excludes
2017-09-10 14:34:28 +02:00
Alexander Neumann
4a0129fc2b
Rename excludeByFile -> rejectIfPresent
2017-09-10 14:25:58 +02:00
Alexander Neumann
a9c705009c
Move reject functions to new file
2017-09-10 14:25:25 +02:00
Alexander Neumann
d937ad8cf6
Rename FilenameCheck to RejectFunc
...
We already have the opposite: pipe.SelectFunc(item string, fi
os.FileInfo) bool, so RejectFunc is a good name.
2017-09-10 14:21:51 +02:00
Alexander Neumann
36e70228f2
Handle invalid key file
2017-09-10 10:55:01 +02:00
Alexander Neumann
c22c582546
Allow multiple exclude-if-present
2017-09-09 21:24:29 +02:00