{"action":"created","issue":{"url":"https://api.github.com/repos/restic/restic/issues/695","repository_url":"https://api.github.com/repos/restic/restic","labels_url":"https://api.github.com/repos/restic/restic/issues/695/labels{/name}","comments_url":"https://api.github.com/repos/restic/restic/issues/695/comments","events_url":"https://api.github.com/repos/restic/restic/issues/695/events","html_url":"https://github.com/restic/restic/pull/695","id":194918363,"number":695,"title":"Align path names generated for file and S3 backend","user":{"login":"jayme-github","id":1632246,"avatar_url":"https://avatars.githubusercontent.com/u/1632246?v=3","gravatar_id":"","url":"https://api.github.com/users/jayme-github","html_url":"https://github.com/jayme-github","followers_url":"https://api.github.com/users/jayme-github/followers","following_url":"https://api.github.com/users/jayme-github/following{/other_user}","gists_url":"https://api.github.com/users/jayme-github/gists{/gist_id}","starred_url":"https://api.github.com/users/jayme-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayme-github/subscriptions","organizations_url":"https://api.github.com/users/jayme-github/orgs","repos_url":"https://api.github.com/users/jayme-github/repos","events_url":"https://api.github.com/users/jayme-github/events{/privacy}","received_events_url":"https://api.github.com/users/jayme-github/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-12T08:46:02Z","updated_at":"2016-12-13T20:13:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/restic/restic/pulls/695","html_url":"https://github.com/restic/restic/pull/695","diff_url":"https://github.com/restic/restic/pull/695.diff","patch_url":"https://github.com/restic/restic/pull/695.patch"},"body":"This aligns the path names generated for S3 backend to the ones used by\r\nthe file backend allowing S3 objects to be used as file backend and\r\nvice versa.\r\n\r\nDirname and Filename generation logic have moved from file backend to\r\ntha backend package.\r\n\r\nAdded a environment variable (AWS_LEGACY_PATHS) to S3 backend which\r\ncat be set to true to switch to legacy pathnames (to be used with\r\nexisting repositories).\r\n\r\nSee #654 for a discussion about this.\r\nI decided to step in with a very simple proposal on how to solve this. Especially because there are some pull requests for new backend that will use the same path names as S3.\r\nThis is probably not the best (or even wanted) solution as it requires S3 users to set a additional environment variable to be able to use their repository but I think it's the easiest one and I wanted to push the discussion forward.\r\n\r\nWe could provide an additional tool for \"one-shot\" migrations from \"legacy S3\" to \"new style S3\" backend paths so that restic does not have to maintain two different path styles forever.\r\n\r\n(Please be lenient with me as I'm in no way familiar with go :smiley: )"},"comment":{"url":"https://api.github.com/repos/restic/restic/issues/comments/266848380","html_url":"https://github.com/restic/restic/pull/695#issuecomment-266848380","issue_url":"https://api.github.com/repos/restic/restic/issues/695","id":266848380,"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},"created_at":"2016-12-13T20:13:17Z","updated_at":"2016-12-13T20:13:17Z","body":"I have an idea: What about recording information about the backend in the repo config? E.g., have a field for subdir depth, the name of the backend used to create the repo. It would allow detecting the directory name/structure used and we can implement a `migrate` command that does the right thing[tm]. Let me think about this for a bit."}}
{"actor":{"display_login":"fd0"}}