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

restore doesn't restore changed files #547

Closed
Animedium opened this issue Jul 25, 2016 · 7 comments
Closed

restore doesn't restore changed files #547

Animedium opened this issue Jul 25, 2016 · 7 comments
Labels
state: need feedback waiting for feedback, e.g. from the submitter type: bug

Comments

@Animedium
Copy link

Output of restic version

restic 0.1.0 (1869591-dirty)
compiled at 2016-07-13 10:24:33 with go1.6.2

Environment: GNU/Linux

Expected behavior

After restore all files will return to the state from time snapshot was taken.

Actual behavior

After restore, files with changes were not restored properly. Changes persist after restore or file after restore is mixed.

Steps to reproduce the behavior

  1. Create directory tree
/temp
└── RESTIC
    ├── BACKUP
    └── FILES
        ├── Dir01
        │   ├── test01.txt
        │   ├── test02.txt
        │   └── test03.txt
        ├── Dir02
        │   ├── test01.txt
        │   ├── test02.txt
        │   └── test03.txt
        └── Dir03
            ├── test01.txt
            ├── test02.txt
            └── test03.txt

In this example all test files contain one line of text like:
This is content of file Dir01/test01.txt

  1. Initiate repository in BACKUP directory and take backup of FILES directory
  2. Modify some test files so the content will look like this (cat command):
  3. Dir01/test01.txt:
only with line before
This is concent of file Dir01/test01.txt
  • Dir01/test02.txt
This is concent of file Dir01/test02.txt
only line after
  • Dir02/test01.txt
line before
string before   This is concent of file Dir02/test01.txt    string after
line after
  1. Restore latest backup to --target /temp/RESTIC

RESULT of cat command on files:

  • Dir01/test01.txt
This is concent of file Dir01/test01.txt
file Dir01/test01.txt
  • Dir01/test02.txt
This is concent of file Dir01/test02.txt
only line after
  • Dir02/test01.txt
This is concent of file Dir02/test01.txt
 of file Dir02/test01.txt   string after
line after
@fd0
Copy link
Member

fd0 commented Jul 26, 2016

Hey, thanks for reporting this. I find your report confusing, can you try to elaborate what the undesired behavior is?

Regarding the file Dir02/test01.txt: Are you sure that the content was

line before
string before   This is concent of file Dir02/test01.txt    string after
line after

when running the second backup and

This is concent of file Dir02/test01.txt
 of file Dir02/test01.txt   string after
line after

after restore?

Can you create a tar of the restic repository and upload it somewhere for me so I can investigate?

@fd0 fd0 added type: bug state: need feedback waiting for feedback, e.g. from the submitter labels Jul 26, 2016
@Animedium
Copy link
Author

Here is repository:
restic_repo.zip

There is no second backup in this test scenario, only one backup and one restore.

So simplified steps look like this:

  1. Create environment (files + repository)
  2. Take backup
  3. Make changes to files
  4. Restore from backup

And the undesider behavior is that modified files are not returned to they original versions by restore.

In example of file Dir02/test01.txt content will change like this after every step:
1.Creation of file:

This is concent of file Dir02/test01.txt

2.No changes:

This is concent of file Dir02/test01.txt

3.Make changes:

line before
string before   This is concent of file Dir02/test01.txt    string after
line after

4.After restore:

This is concent of file Dir02/test01.txt
 of file Dir02/test01.txt   string after
line after

@fd0
Copy link
Member

fd0 commented Jul 26, 2016

Thanks, I'll have a look. What's the password used for the repo?

@Animedium
Copy link
Author

password is: test01

@fd0 fd0 changed the title restore don't restore changed files restore doesn't restore changed files Jul 27, 2016
@fd0
Copy link
Member

fd0 commented Jul 27, 2016

What version of restic is this? The version command says it's 1869591, but I'm unable to find this commit anywhere. Can you please paste the output of the following commands:

git status
git diff
git log --pretty=short origin/master..

@Animedium
Copy link
Author

I am really sorry for trouble. I included in report wrong version from different machine where I also tested if this problem is reproducible.

Here is the correct version that I used in this example:

restic 0.1.0 (v0.1.0-561-gb8c7622)
compiled at 2016-07-19 16:38:38 with go1.5.1

And all commands you asked.
git status

On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

git diff is empty

git log --pretty=short origin/master.. is also empty

@fd0
Copy link
Member

fd0 commented May 14, 2017

Since there hasn't been any activity here recently and I cannot reproduce the issue I'm going to close it for now. Please feel free to add further comments. Thanks.

@fd0 fd0 closed this as completed May 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: need feedback waiting for feedback, e.g. from the submitter type: bug
Projects
None yet
Development

No branches or pull requests

2 participants