{"action":"created","issue":{"url":"https://api.github.com/repos/restic/restic/issues/255","labels_url":"https://api.github.com/repos/restic/restic/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/restic/restic/issues/255/comments","events_url":"https://api.github.com/repos/restic/restic/issues/255/events","html_url":"https://github.com/restic/restic/issues/255","id":100134738,"number":255,"title":"Feature: Backup data read from stdin","user":{"login":"fd0","id":123276,"avatar_url":"https://avatars.githubusercontent.com/u/123276?v=3","gravatar_id":"","url":"https://api.github.com/users/fd0","html_url":"https://github.com/fd0","followers_url":"https://api.github.com/users/fd0/followers","following_url":"https://api.github.com/users/fd0/following{/other_user}","gists_url":"https://api.github.com/users/fd0/gists{/gist_id}","starred_url":"https://api.github.com/users/fd0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fd0/subscriptions","organizations_url":"https://api.github.com/users/fd0/orgs","repos_url":"https://api.github.com/users/fd0/repos","events_url":"https://api.github.com/users/fd0/events{/privacy}","received_events_url":"https://api.github.com/users/fd0/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/restic/restic/labels/feature","name":"feature","color":"bfe5bf"},{"url":"https://api.github.com/repos/restic/restic/labels/rfc","name":"rfc","color":"cc317c"},{"url":"https://api.github.com/repos/restic/restic/labels/user%20interface","name":"user interface","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-10T18:19:47Z","updated_at":"2015-08-11T19:37:37Z","closed_at":null,"body":"This issue tracks implementing the feature that restic reads data from stdin and saves it to the repo (with dedup etc).\r\n\r\nI can imagine several use cases, e.g.:\r\n * Saving SQL dumps directly: `mysqldump db | restic backup -`\r\n * Saving complete devices: `dd if=/dev/sda | restic backup -`\r\n\r\nBefore implementing this, we need to decide how to save this in the json data structures. I'd like restic to behave consistent with this, e.g. when the repo is mounted with the fuse backend, data read from stdin should appear as a file. I'd also like to be able to write this data to a file.\r\n\r\nAny other thoughts or use cases that haven't been mentioned so far? Do you like the syntax (`restic backup -`), or should we rather use `restic backup --stdin`?\r\n"},"comment":{"url":"https://api.github.com/repos/restic/restic/issues/comments/130035658","html_url":"https://github.com/restic/restic/issues/255#issuecomment-130035658","issue_url":"https://api.github.com/repos/restic/restic/issues/255","id":130035658,"user":{"login":"cfcs","id":9653993,"avatar_url":"https://avatars.githubusercontent.com/u/9653993?v=3","gravatar_id":"","url":"https://api.github.com/users/cfcs","html_url":"https://github.com/cfcs","followers_url":"https://api.github.com/users/cfcs/followers","following_url":"https://api.github.com/users/cfcs/following{/other_user}","gists_url":"https://api.github.com/users/cfcs/gists{/gist_id}","starred_url":"https://api.github.com/users/cfcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfcs/subscriptions","organizations_url":"https://api.github.com/users/cfcs/orgs","repos_url":"https://api.github.com/users/cfcs/repos","events_url":"https://api.github.com/users/cfcs/events{/privacy}","received_events_url":"https://api.github.com/users/cfcs/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T19:37:37Z","updated_at":"2015-08-11T19:37:37Z","body":"I'm a fan of `-` for explicitness. If a shells script uses a variable to specify the target, and that target turns out to be some reason (by mistake or due to filesystem errors or whatever), I'd like an error message and a negative return value to be cast rather than having it block for input and uploading that."}}