{"action":"created","issue":{"url":"https://api.github.com/repos/sebastianfeldmann/phpbu/issues/63","repository_url":"https://api.github.com/repos/sebastianfeldmann/phpbu","labels_url":"https://api.github.com/repos/sebastianfeldmann/phpbu/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/sebastianfeldmann/phpbu/issues/63/comments","events_url":"https://api.github.com/repos/sebastianfeldmann/phpbu/issues/63/events","html_url":"https://github.com/sebastianfeldmann/phpbu/issues/63","id":155376208,"number":63,"title":"Error when make backup of directory","user":{"login":"silasrm","id":197187,"avatar_url":"https://avatars.githubusercontent.com/u/197187?v=3","gravatar_id":"","url":"https://api.github.com/users/silasrm","html_url":"https://github.com/silasrm","followers_url":"https://api.github.com/users/silasrm/followers","following_url":"https://api.github.com/users/silasrm/following{/other_user}","gists_url":"https://api.github.com/users/silasrm/gists{/gist_id}","starred_url":"https://api.github.com/users/silasrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silasrm/subscriptions","organizations_url":"https://api.github.com/users/silasrm/orgs","repos_url":"https://api.github.com/users/silasrm/repos","events_url":"https://api.github.com/users/silasrm/events{/privacy}","received_events_url":"https://api.github.com/users/silasrm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-17T22:21:37Z","updated_at":"2016-05-18T06:50:32Z","closed_at":null,"body":"Hi,\r\n\r\nFirst, congratulation for the ideia.\r\n\r\nMy error occur when try to make a backup from directory with new files created constantly.\r\n\r\n```\r\nException 'phpbu\\App\\Exception' with message 'tar failed: /bin/tar: arquivos/pacientes: file changed as we read it ' in phar:///usr/local/bin/phpbu/Backup/Source/Tar.php:104\r\n```\r\n```\r\nException 'phpbu\\App\\Exception' with message 'tar failed: /bin/tar: uploads/pacientes: file changed as we read it ' in phar:///usr/local/bin/phpbu/Backup/Source/Tar.php:104\r\n```\r\n\r\nAny solution to this?\r\n\r\nThank's."},"comment":{"url":"https://api.github.com/repos/sebastianfeldmann/phpbu/issues/comments/219940433","html_url":"https://github.com/sebastianfeldmann/phpbu/issues/63#issuecomment-219940433","issue_url":"https://api.github.com/repos/sebastianfeldmann/phpbu/issues/63","id":219940433,"user":{"login":"sebastianfeldmann","id":9250358,"avatar_url":"https://avatars.githubusercontent.com/u/9250358?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastianfeldmann","html_url":"https://github.com/sebastianfeldmann","followers_url":"https://api.github.com/users/sebastianfeldmann/followers","following_url":"https://api.github.com/users/sebastianfeldmann/following{/other_user}","gists_url":"https://api.github.com/users/sebastianfeldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianfeldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianfeldmann/subscriptions","organizations_url":"https://api.github.com/users/sebastianfeldmann/orgs","repos_url":"https://api.github.com/users/sebastianfeldmann/repos","events_url":"https://api.github.com/users/sebastianfeldmann/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianfeldmann/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T06:50:31Z","updated_at":"2016-05-18T06:50:31Z","body":"Hi\r\n\r\nthis is a tar restriction, so you have to work around it.\r\nHere are some suggestions.\r\n\r\nAs you write constantly I think there is a lot of data. So I assume copying the directory and create a backup from there is not an option. If I'm wrong here, phpbu could do the copy before hand, create the backup and delete the copy again.\r\n\r\nSome other options are:\r\n\r\n- Sharding the source diectory by day, so yesterdays directory is save to compress because there are no writes to it anymore. This way you do a kind of incremental backup, but to restore it you have to restore all your backups not just the last one. So you have to keep them all somewhere :)\r\n\r\n- Having a shadow copy of your data. For example use rsync and cron to sync your data every 5 minutes, stop the sync for the time of the backup and create a backup  from your \"shadow\" copy.\r\n\r\n- Use some special tools that are able to create consistent backups, and maybe integrate them into phpbu #hint :)\r\n\r\n\r\n- "}}