{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/1371","labels_url":"https://api.github.com/repos/syncthing/syncthing/issues/1371/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/syncthing/issues/1371/comments","events_url":"https://api.github.com/repos/syncthing/syncthing/issues/1371/events","html_url":"https://github.com/syncthing/syncthing/issues/1371","id":58416270,"number":1371,"title":"Full re-sync folder after rotation files","user":{"login":"QVirus","id":6019850,"avatar_url":"https://avatars.githubusercontent.com/u/6019850?v=3","gravatar_id":"","url":"https://api.github.com/users/QVirus","html_url":"https://github.com/QVirus","followers_url":"https://api.github.com/users/QVirus/followers","following_url":"https://api.github.com/users/QVirus/following{/other_user}","gists_url":"https://api.github.com/users/QVirus/gists{/gist_id}","starred_url":"https://api.github.com/users/QVirus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QVirus/subscriptions","organizations_url":"https://api.github.com/users/QVirus/orgs","repos_url":"https://api.github.com/users/QVirus/repos","events_url":"https://api.github.com/users/QVirus/events{/privacy}","received_events_url":"https://api.github.com/users/QVirus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/syncthing/syncthing/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-20T21:58:23Z","updated_at":"2015-02-23T20:28:21Z","closed_at":"2015-02-22T19:41:59Z","body":"I have backup script like this:\r\n```\r\n#!/bin/bash\r\nBP=\"/home/syncthing/Sync/test\"\r\nLEVEL=30\r\nrm -f $BP/$LEVEL.dmp\r\nwhile : ; do\r\n  if [ $LEVEL = \"1\" ] ; then\r\n    break\r\n  fi\r\n  mv $BP/$((LEVEL-1)).dmp $BP/$LEVEL.dmp 2>/dev/null\r\n  LEVEL=$((LEVEL-1))\r\ndone\r\n\r\ndd if=/dev/urandom of=$BP/1.dmp bs=1M count=50\r\n```\r\n\r\nExpectation:\r\n* (Pre?)Remove the file 30.dmp\r\n* Files 1-29.dmp rename/move to 2-30.dmp\r\n* Sync 1.dmp\r\n* (Finally remove 30.dmp?)\r\n\r\nWhat happens:\r\n* Sync 1.dmp\r\n* Part of the file 2.dmp taken from the old file 1.dmp, until synchronized the last block of the file 1.dmp\r\n* Synchronize other files by the same principle\r\n\r\nIn the final we have the traffic is almost the same as with the full folder sync."},"comment":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/comments/75624902","html_url":"https://github.com/syncthing/syncthing/issues/1371#issuecomment-75624902","issue_url":"https://api.github.com/repos/syncthing/syncthing/issues/1371","id":75624902,"user":{"login":"jpjp","id":6050800,"avatar_url":"https://avatars.githubusercontent.com/u/6050800?v=3","gravatar_id":"","url":"https://api.github.com/users/jpjp","html_url":"https://github.com/jpjp","followers_url":"https://api.github.com/users/jpjp/followers","following_url":"https://api.github.com/users/jpjp/following{/other_user}","gists_url":"https://api.github.com/users/jpjp/gists{/gist_id}","starred_url":"https://api.github.com/users/jpjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpjp/subscriptions","organizations_url":"https://api.github.com/users/jpjp/orgs","repos_url":"https://api.github.com/users/jpjp/repos","events_url":"https://api.github.com/users/jpjp/events{/privacy}","received_events_url":"https://api.github.com/users/jpjp/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T20:28:21Z","updated_at":"2015-02-23T20:28:21Z","body":"Great! (You can also use logrotate and the dateext option)."}}