Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--time not usable for backups from stdin #1608

Closed
kaleng opened this issue Feb 8, 2018 · 1 comment
Closed

--time not usable for backups from stdin #1608

kaleng opened this issue Feb 8, 2018 · 1 comment

Comments

@kaleng
Copy link

kaleng commented Feb 8, 2018

Output of restic version

restic 0.8.1 (57dc605)
compiled with go1.9.2 on linux/amd64

How did you run restic exactly?

cat backupfile | restic -r rest:http://backuphost/ backup --time "2011-10-15 17:45:37" --hostname "myhost" --stdin --stdin-filename backupfile

What backend/server/service did you use to store the repository?

Expected behavior

Restic creates a new snapshot with the given time, hostname and filename.

Actual behavior

Restic creates a new snapshot with the given hostname and filename but timestamp of the execution of restic instead of the time given with --time

Steps to reproduce the behavior

  1. Create repository
  2. create new backup, use --stdin and --time
  3. list created snapshots
  4. snapshot time is set to time of backup, not the time given by --time

Do you have any idea what may have caused this?

time.Now() is used in

sn, err := restic.NewSnapshot([]string{name}, r.Tags, r.Hostname, time.Now())
which is called by readBackupFromStdin

Do you have an idea how to solve the issue?

nope

Did restic help you or made you happy in any way?

What? Are you kidding? Of course it did! Finally a nice and easy way to do backups. You're doing great work! Thank You!

@kaleng kaleng changed the title --time not usable for stdin backups --time not usable for backups from stdin Feb 8, 2018
@fd0
Copy link
Member

fd0 commented Feb 8, 2018

Thanks for the report, I consider this a bug :)

@fd0 fd0 closed this as completed in #1703 Apr 3, 2018
fd0 added a commit that referenced this issue Apr 3, 2018
Fixed issue #1608 - Use --time argument properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants