{"action":"created","issue":{"url":"https://api.github.com/repos/dalibo/pitrery/issues/9","repository_url":"https://api.github.com/repos/dalibo/pitrery","labels_url":"https://api.github.com/repos/dalibo/pitrery/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/dalibo/pitrery/issues/9/comments","events_url":"https://api.github.com/repos/dalibo/pitrery/issues/9/events","html_url":"https://github.com/dalibo/pitrery/issues/9","id":144324872,"number":9,"title":"backup_pitr.cleanup() : ssh_user is missing","user":{"login":"phylexx","id":18148014,"avatar_url":"https://avatars.githubusercontent.com/u/18148014?v=3","gravatar_id":"","url":"https://api.github.com/users/phylexx","html_url":"https://github.com/phylexx","followers_url":"https://api.github.com/users/phylexx/followers","following_url":"https://api.github.com/users/phylexx/following{/other_user}","gists_url":"https://api.github.com/users/phylexx/gists{/gist_id}","starred_url":"https://api.github.com/users/phylexx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phylexx/subscriptions","organizations_url":"https://api.github.com/users/phylexx/orgs","repos_url":"https://api.github.com/users/phylexx/repos","events_url":"https://api.github.com/users/phylexx/events{/privacy}","received_events_url":"https://api.github.com/users/phylexx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T16:56:55Z","updated_at":"2016-03-30T22:12:56Z","closed_at":null,"body":"Version : Pitrery 1.10\r\nThe cleanup phase in backup_pitr does not work when archiving is done over SSH.\r\n\r\nbackup_pitr fails to connect to remote ssh server because no user is provided in connection string. The current user is then used by ssh, resulting in a password prompt or a connection error (since the default user is unknown on remote server).\r\n\r\nbackup_pitr.cleanup() on lines 67 and 69 :\r\n```\r\nssh $target \"test -d \\\"$backup_dir\\\"\" 2>/dev/null\r\n...\r\nssh $target \"rm -rf $backup_dir\" 2>/dev/null\r\n```\r\nWe can see that ssh_user is missing and only target host is passed as parameter.\r\n\r\nI suggest fixing those lines as follow, to add the ssh_user :\r\n```\r\nssh ${ssh_user:+$ssh_user@}$target \"test -d \\\"$backup_dir\\\"\" 2>/dev/null\r\n...\r\nssh ${ssh_user:+$ssh_user@}$target \"rm -rf $backup_dir\" 2>/dev/null\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dalibo/pitrery/issues/comments/203662843","html_url":"https://github.com/dalibo/pitrery/issues/9#issuecomment-203662843","issue_url":"https://api.github.com/repos/dalibo/pitrery/issues/9","id":203662843,"user":{"login":"orgrim","id":118564,"avatar_url":"https://avatars.githubusercontent.com/u/118564?v=3","gravatar_id":"","url":"https://api.github.com/users/orgrim","html_url":"https://github.com/orgrim","followers_url":"https://api.github.com/users/orgrim/followers","following_url":"https://api.github.com/users/orgrim/following{/other_user}","gists_url":"https://api.github.com/users/orgrim/gists{/gist_id}","starred_url":"https://api.github.com/users/orgrim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orgrim/subscriptions","organizations_url":"https://api.github.com/users/orgrim/orgs","repos_url":"https://api.github.com/users/orgrim/repos","events_url":"https://api.github.com/users/orgrim/events{/privacy}","received_events_url":"https://api.github.com/users/orgrim/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T22:12:56Z","updated_at":"2016-03-30T22:12:56Z","body":"Hello,\r\nThank you for the report. It is indeed a bug, which has been fixed in the master branch by commit 579d6ce053857254164147584ecd7385dbd11634.\r\n\r\nCould you please check and confirm is work with the master branch?\r\n\r\nThank you"}}