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

Enhancement: Add archive diff command #174

Open
LegoChicken opened this issue Jan 13, 2015 · 7 comments
Open

Enhancement: Add archive diff command #174

LegoChicken opened this issue Jan 13, 2015 · 7 comments

Comments

@LegoChicken
Copy link

Add a command which list the file difference between archives. Would give something like:
"- deleted_file"
"+ added_file"
"* changed_file"
Something like the obnam diff command. Syntax:
attic diff /data/myrepo.attic "archive label 1" "archive label 2"
"archive label 2" could be omitted and it would use the archive chronologically before "archive label 1".
When run an automated backup I email a summary to myself. Having this list is very useful as it shows whether something has been deleted when it shouldn't have been.

@dnnr
Copy link

dnnr commented Jan 13, 2015

You can already do this with any third-party tools of your own choice, using the FUSE mount feature in attic. I wouldn't suggest reinventing the wheel here.

@LegoChicken
Copy link
Author

Although it could be done by a third party tool, it would be slow as to detect differences it would have read the files. Attic could just look at the metadata which would be much faster.

@dnnr
Copy link

dnnr commented Jan 13, 2015

I haven't checked if attic maybe even already does this, but the information you need for this could still be exposed by attic in the FUSE mount via hardlinks. Same inode numbers for the same file in two archives -> file hasn't changed. After all, attic should be well aware if two file paths reference the same content, and there's no need to hide that information in the mountpoint.

@LegoChicken
Copy link
Author

I couldn't see a way of doing using existing attic commands. Although the information may be available via the FUSE mount, it would be a slower to obtain. This would be particularly the case for remote repositories. So I think it should be an internal command because attic would be able to use the metadata.

@dnnr
Copy link

dnnr commented Jan 14, 2015

There's no reason for such an internal command to be much faster (by any significant measure) than extracting the information from the FUSE mount. Granted, the FUSE mount could be implemented more efficiently than it is currently, but then I'd advise to work on this instead of introducing redundant features.

@LegoChicken
Copy link
Author

I think this would not be a redundant feature. It is important for backup tool to be able to tell the user what it has done.

@anarcat
Copy link

anarcat commented Jan 29, 2015

this is similar to #158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants