mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 23:06:32 +00:00
parent
5a43ca1ccb
commit
663e8284b2
@ -30,11 +30,11 @@ func runInit(gopts GlobalOptions, args []string) error {
|
|||||||
|
|
||||||
be, err := create(gopts.Repo, gopts.extended)
|
be, err := create(gopts.Repo, gopts.extended)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Fatalf("create backend at %s failed: %v\n", gopts.Repo, err)
|
return errors.Fatalf("create repository at %s failed: %v\n", gopts.Repo, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
gopts.password, err = ReadPasswordTwice(gopts,
|
gopts.password, err = ReadPasswordTwice(gopts,
|
||||||
"enter password for new backend: ",
|
"enter password for new repository: ",
|
||||||
"enter password again: ")
|
"enter password again: ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -44,10 +44,10 @@ func runInit(gopts GlobalOptions, args []string) error {
|
|||||||
|
|
||||||
err = s.Init(gopts.ctx, gopts.password)
|
err = s.Init(gopts.ctx, gopts.password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Fatalf("create key in backend at %s failed: %v\n", gopts.Repo, err)
|
return errors.Fatalf("create key in repository at %s failed: %v\n", gopts.Repo, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
Verbosef("created restic backend %v at %s\n", s.Config().ID[:10], gopts.Repo)
|
Verbosef("created restic repository %v at %s\n", s.Config().ID[:10], gopts.Repo)
|
||||||
Verbosef("\n")
|
Verbosef("\n")
|
||||||
Verbosef("Please note that knowledge of your password is required to access\n")
|
Verbosef("Please note that knowledge of your password is required to access\n")
|
||||||
Verbosef("the repository. Losing your password means that your data is\n")
|
Verbosef("the repository. Losing your password means that your data is\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user