Commit Graph

174 Commits

Author SHA1 Message Date
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
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 c22c582546 Allow multiple exclude-if-present 2017-09-09 21:24:29 +02:00
Alexander Neumann ea75509d6e Print warning for non-existing items 2017-09-09 21:12:41 +02:00
Tobias Klein 43ff971dfd new sub-option for backup: time
New option to specify the timestamp for a backup
2017-09-09 13:26:35 +02:00
Fabian Wickborn dbda892542 Add option to exclude directories with a tagfile
The option is named --exclude-if-present and accepts a parameter
filename[:content]. Directories are excluded and their contents is not
backed up if they contain a file with the specified name and,
optionally, that starts with the specified content. The tagfile itself
is never excluded.

There is also a shortcut --exclude-caches that works in the same way as
the likewise-named option of tar(1): Directories are recognized as cache
if they contain a file named "CACHEDIR.TAG.

Closes #317.
2017-09-09 09:57:42 +02:00
Loic Nageleisen 4a36993c19 Smarter filter when children won't match
This improves restore performance by several orders of magniture by not
going through the whole tree recursively when we can anticipate that no
match will ever occur.
2017-08-16 15:25:02 +02:00
Alexander Neumann 6bc43a4198 manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
Alexander Neumann 739350fd8e backup: Do not print hostname in help text
This is necessary so that the manpage generation is deterministic and we
can test if the man pages are up to date when the CI tests run.
2017-08-05 12:05:53 +02:00
Johannes Kohnen 37aad2e3aa Close exclude files and check errors 2017-08-01 17:34:27 +00:00
Pauline Middelink c95e2b009e Simpify cmd_backup and cmd_init now we have the password in gopts. 2017-07-24 23:32:55 +02:00
Alexander Neumann 23c903074c Move restic package to internal/restic 2017-07-24 17:43:32 +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 4ec5050cbb backup: Hide status output for narrow terminals
closes #428
2016-02-10 17:28:48 +01:00
Alexander Neumann b5976474dd backup: add debug output for excluded files/dirs 2015-10-27 22:34:30 +01:00
Alexander Neumann 054256468b Fix message display for parent snapshot id 2015-07-25 18:10:23 +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 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 7fd52f9f57 Add exclude filter to archiver and 'backup' command 2015-07-20 19:21:01 +02:00
Alexander Neumann 57eb1a4eea cmd_backup: filter non-existing target files/dirs 2015-07-06 23:02:16 +02:00
Alexander Neumann 13e9a35f96 cmd/restic: Add lock handling, interrupt cleanup 2015-06-28 13:52:22 +02:00
Alexander Neumann 65a0def949 cmd/restic: Add locks to commands 2015-06-28 13:52:22 +02:00
Alexander Neumann 7d2699b429 cmd/restic: Rename variable, no functional changes 2015-06-28 13:52:22 +02:00
Alexander Neumann 675f341b6d Output warnings/errors to configurable writer 2015-06-21 17:40:22 +02:00
Alexander Neumann a43733d552 Introduce `Verbosef` 2015-06-21 17:40:22 +02:00
Alexander Neumann 4388474cdc Restructure `cmd/restic`, no functional changes 2015-06-21 17:40:22 +02:00
Alexander Neumann 9c375ea382 Refactor backup a bit 2015-06-07 19:08:37 +02:00
Alexander Neumann fd80499954 Refactor terminal recognition, add --quiet parameter 2015-06-07 18:30:11 +02:00
Alexander Neumann 6e38a8a033 Move FindSnapshot, make Repository.List() return IDs 2015-05-17 20:58:22 +02:00
Alexander Neumann b3a75ecc1c Correct usage for backup cmd 2015-05-02 02:05:09 +02:00
Florian Weingarten 0d9360a815 more cleanup 2015-04-29 22:33:34 -04:00
Alexander Neumann 24fc5d343f Remove leftover comment 2015-04-30 00:25:00 +02:00
Alexander Neumann 60a0fe8349 Major restructure, bundle blobs
This commit also breaks the repository format.
2015-04-29 23:27:32 +02:00
Alexander Neumann 6871e1bb58 Merge remote-tracking branch 'fw42/fix_nan_and_inf' 2015-04-26 12:09:14 +02:00
Florian Weingarten 61b1a5b1de Count errors separately and not as files that are "done" 2015-04-26 01:54:35 +00:00
Florian Weingarten 6c776468ab Fix floating point presentation 2015-04-25 13:20:41 -04:00
Florian Weingarten ebae478631 Prefer mixedCaps over underscore 2015-04-24 19:39:32 -04:00
Matthieu Rakotojaona 1d0f8fa80e Take last snapshot as parent by default and allow force re-reading 2015-04-07 22:03:50 +02:00
Alexander Neumann 4d24f2eab3 Correct plen for snapshots 2015-03-28 16:16:19 +01:00
Alexander Neumann 5e69788eac Refactor backends 2015-03-28 14:36:50 +01:00
Alexander Neumann cfa2229bc0 Refactor cache refresh for blobs, add progress 2015-03-22 15:09:50 +01:00
Alexander Neumann 865d315ad6 Shorten status output if terminal is small
Closes #107
2015-03-16 20:48:29 +01:00
Alexander Neumann 489cc654e8 Fix ETA display
Closes #111
2015-03-16 20:20:53 +01:00
Alexander Neumann 14298fe232 Cache blobs for each snapshot 2015-03-09 23:50:32 +01:00
Alexander Neumann 798ac97a52 Re-enable dedup, add test (closes #95) 2015-03-07 12:05:33 +01:00
Alexander Neumann f167366be5 Add walk for trees, restructure 2015-03-02 19:58:06 +01:00
Alexander Neumann c8be54564f Add local cache 2015-03-02 10:04:01 +01:00
Alexander Neumann a59b0ec1f6 Add progress report for loading blobs 2015-02-21 15:32:48 +01:00
Alexander Neumann 58cded6b75 Refactor progress reporting 2015-02-21 14:25:06 +01:00
Alexander Neumann a0fea201d9 Reenable Preloading 2015-02-18 23:10:59 +01:00
Alexander Neumann 65aae5f8c1 Disable preloading for now 2015-02-17 23:38:15 +01:00
Alexander Neumann 4bb7f2f2ed Add Preloader for blobs 2015-02-17 22:39:44 +01:00
Alexander Neumann d4cfa7b797 Remove scanner (not needed any more) 2015-02-16 23:47:14 +01:00
Alexander Neumann f8f8107d55 wip 2015-02-15 15:17:24 +01:00
Alexander Neumann 57b8373bc9 Progress: Rename functions, fix documentation 2015-02-07 15:27:09 +01:00
Alexander Neumann 84ad6cf4d2 Return error on backup 2015-02-03 22:05:46 +01:00
Alexander Neumann 203a911de9 Refactor repository structure
Merge Map data type into Tree.
2015-01-14 16:34:30 +01:00
Alexander Neumann 33bcf31bae Fix incremental backup
Copying blobs (for unchanged files and subtrees) from old BlobList to
new BlobList was missing
2015-01-05 21:40:43 +01:00
Alexander Neumann e543f5926c Refactor Archiver and backup command
Improve incremental backup by first scanning the tree, loading the old
tree and afterwards comparing both trees in memory.
2015-01-04 22:39:30 +01:00
Alexander Neumann 4b70bba588 Split Scanner from Archiver, refactor Progress 2015-01-04 18:23:00 +01:00
Alexander Neumann a93bc3c991 Rename functions, remove code for compare
* Archiver: Rename loadTree -> scan and LoadTree -> Scan
 * Archiver: Remove code to compare against an old snapshot/tree,
   the current implementation was really slow
2015-01-04 16:13:50 +01:00
Alexander Neumann ef41a77aff Remove explicit key handling 2014-12-21 18:10:19 +01:00
Alexander Neumann 28bb061ad3 Refactor commands 2014-12-07 16:32:23 +01:00
Alexander Neumann 988d18bb1d Improve output 2014-12-07 14:26:32 +01:00
Alexander Neumann e2fea0d088 Rename khepri -> restic 2014-12-05 21:45:49 +01:00