Unix Autobackup script: file changed as we read it

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

bungernut

New Member
Jul 29, 2019
4
0
0
Hi All

I'm trying to automate backups with a generic init script, but save-off does not seem to be stopping writing to disk. Do I have to stop the server to do a proper backup?
Code:
bung@mort:~/Minecraft$ /etc/init.d/mineserv backup
tar: Direwolf_1.6.4_1.0.7/DW20World/region/r.0.-2.mca: file changed as we read it
tar: Direwolf_1.6.4_1.0.7: file changed as we read it
bung@mort:~/Minecraft$

My script is at:
https://github.com/bungernut/mineserv/blob/master/mineserv
 

bungernut

New Member
Jul 29, 2019
4
0
0
So, for reference the sleep time was just insufficient to allow all changes to be written.
sleep(10) works as expected.
Perhaps this will help someone else...