Alexander Neumann
84e493beba
b2: Warn when account ID or key is empty
...
Closes #1490
2017-12-19 21:12:38 +01:00
Alexander Neumann
2f26fb8834
Only print cache warning for terminals
2017-12-13 19:58:10 +01:00
Alexander Neumann
3a5e040b7e
Merge pull request #1439 from armhold/propagate-context
...
replace ad-hoc context.TODO() with gopts.ctx
2017-12-08 20:27:36 +01:00
George Armhold
1695c8ed55
use global context for check, debug, dump, find, forget, init, key,
...
list, mount, tag, unlock commands
gh-1434
2017-12-06 07:02:55 -05: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
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
Alexander Neumann
897c923cc9
Retry failed backend requests
2017-10-14 15:56:25 +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
Fabian Wickborn
69a6e622d0
Add REST backend option to use CA root certificate
...
Closes #1114 .
2017-10-04 22:14:10 +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
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
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
36e70228f2
Handle invalid key file
2017-09-10 10:55:01 +02:00
Alexander Neumann
b67c178672
Merge pull request #1149 from restic/azure-support
...
Add Azure blob storage as backend
2017-08-09 21:30:35 +02:00
Dipta Das
ba75a3884c
Add Google Cloud Storage as backend
...
Environment variables:
GOOGLE_PROJECT_ID=gcp-project-id
GOOGLE_APPLICATION_CREDENTIALS=path-to-json-file
Environment variables for test:
RESTIC_TEST_GS_PROJECT_ID=gcp-project-id
RESTIC_TEST_GS_APPLICATION_CREDENTIALS=path-to-json-file
RESTIC_TEST_GS_REPOSITORY=gs:us-central1/test-bucket
Init repository:
$ restic -r gs🪣 /[prefix] init
2017-08-06 21:47:55 +02:00
Alexander Neumann
d91d89eef6
azure: Create container if it does not exist
2017-08-06 21:47:04 +02:00
Dipta Das
3a85b6b7c6
Add Azure Blob Storage as backend
...
Environment variables:
AZURE_ACCOUNT_NAME=storage-account-name
AZURE_ACCOUNT_KEY=storage-account-key
Environment variables for test:
RESTIC_TEST_AZURE_ACCOUNT_NAME=storage-account-name
RESTIC_TEST_AZURE_ACCOUNT_KEY=storage-account-key
RESTIC_TEST_AZURE_REPOSITORY=azure:restic-test-container
Init repository:
$ restic -r azure:container-name:/prefix/dir init
2017-08-06 21:47:04 +02:00
donat
893bc9f777
Error message in case PasswordFile is missing
2017-07-27 14:23:08 +03: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
Pauline Middelink
d5615a67c8
Refactor password resolving.
...
Instead of determining the password lazily during ReadPassword(), do so now in
cobra.PersistentPreRunE() so we can store the result in the globalOptions and
reuse/override when applicable without having to worry about the environment
or flag options interfering.
2017-07-24 23:05:37 +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
1287b307ac
Add cleanup handler to restore terminal state
...
Closes #402
2016-02-13 18:29:26 +01:00
Alexander Neumann
1dd4c52a8b
Add comments, configure flag library
2016-01-17 18:48:05 +01:00
Alexander Neumann
1922a4272c
s3: fix usage
...
Ignore error response for existing bucket, add more debug code.
2016-01-17 18:48:05 +01:00
Alexander Neumann
7d5f8214cf
use new backend open with config
2016-01-17 18:48:05 +01:00
Alexander Neumann
a1440c819b
Make NoLock a global option
2015-11-13 12:33:59 +01:00
Alexander Neumann
18d7f7f835
Read password from stdin if terminal is not a tty
2015-11-04 22:20:58 +01:00
Klaus Post
4dc746dac2
Change repository type detection to first check if path is a directory that exists.
...
The method of determining if a repository exists doesn't work on Windows, since
the "url.Scheme" will contain the drive letter - "c" in "c:\backup",
so as a first step we check if the URL can be opened as a file,
and if so, we assume it is a 'local' type repository.
2015-08-14 15:39:16 +02:00
Alexander Neumann
9e9177ab73
Add build.go
2015-06-24 20:29:58 +02:00
Alexander Neumann
6c2d6bfd11
Merge pull request #184 from howeyc/backend-s3
...
Add Amazon S3 backend.
2015-06-23 20:14:47 +02:00
Alexander Neumann
675f341b6d
Output warnings/errors to configurable writer
2015-06-21 17:40:22 +02:00
Alexander Neumann
cfaf8ab8a6
Add integration test for key handling
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