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

Add --json option to "restic snapshots" (feature) #726

Closed
yhafri opened this issue Jan 18, 2017 · 7 comments
Closed

Add --json option to "restic snapshots" (feature) #726

yhafri opened this issue Jan 18, 2017 · 7 comments
Labels
type: feature enhancement improving existing features

Comments

@yhafri
Copy link

yhafri commented Jan 18, 2017

Output of restic version

Any

Expected behavior

Being able to embed the result of snapshots in other services (ex. daily nice formatted HTML report).

$ restic --json -r /tmp/backup snapshots
{
  [ "id:"40dc1520", "date":"2015-05-08 21:38:30", "host":"kasimir", "tag":"", "directory":"/home/user/work" ],
  [ "id:"79766175", "date":"2015-05-08 21:40:19", "host":"kasimir", "tag":"", "directory":"/home/user/work" ]
}

Actual behavior

$ restic -r /tmp/backup snapshots
ID        Date                 Host    Tags   Directory
----------------------------------------------------------------------
40dc1520  2015-05-08 21:38:30  kasimir        /home/user/work
79766175  2015-05-08 21:40:19  kasimir        /home/user/work
@fd0
Copy link
Member

fd0 commented Jan 18, 2017

Interesting idea, thanks for reporting it!

@fd0 fd0 added the type: feature enhancement improving existing features label Jan 18, 2017
@yhafri
Copy link
Author

yhafri commented Jan 31, 2017

Fantastic job @fd0.
I'll start testing and report any issue I may found

@yhafri
Copy link
Author

yhafri commented Jan 31, 2017

And special thanks to @ibib for the PR

@yhafri
Copy link
Author

yhafri commented Feb 26, 2017

Hi guys

Can we extend this --json feature to the find command?
Something like:

$ restic --json find -s 82a6e9de *.pdf

@ibib @fd0 your thoughts on this please ?

@ibib
Copy link
Contributor

ibib commented Feb 27, 2017

Sounds great. My masterplan is to implement a JSON output for every command.

The Problem is that i cant give you a timeline for it.

@yhafri
Copy link
Author

yhafri commented Feb 27, 2017

@ibib excellent
As I've told @fd0 before, we can donate for it if you're interested.

@fd0
Copy link
Member

fd0 commented Feb 27, 2017

I think it's a good idea (I've talked about it with @ibib already). I'm going to close this issue, since the option for the snapshots command is already implemented.

@fd0 fd0 closed this as completed Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature enhancement improving existing features
Projects
None yet
Development

No branches or pull requests

3 participants