I have two questions, both of which regard Tar in the linux terminal. To give you an idea of what I am seeing, I have posted a link to an image of my desktop below. http://worldofclucky.net/errors/ServerLag/desktop.png Linux Ubuntu 12.04 Desktop http://wocl.net/errors/ServerLag/desktop.png1
As you can see on the terminal in the upper left hand corner, there are three messages:
tar: ./Frisnuk/Frisnuk/region/r.0.0.mca: file changed as we read it
tar: ./Frisnuk/server.log: file changed as we read it
ls: cannot access home/clucky/MinecraftServers/.backups/Backup-08-January-2013-15:31.tar.gz: No such file or directory
On the first two messages, it states that can not read a file because it changed. The file changed because there is a server modifying the content as it runs, this shouldn't be an issue to the overall backup because, being they are the region files from a Minecraft server, the files can be used seperately from each other. My main concern is, is it skipping the files, or redoing them? If it is skipping the files, this could be a MAJOR loophole in the backup, because a player with malicious intent could purposely modify the region while it is backing up, preventing it from backing up. So if it is skipping the file, how can I repeat it without having to redo the entire backup?
On the third message, it states that it can not access the file home/clucky/MinecraftServers/.backups/Backup-08-January-2013-15:31.tar.gz, however, as you can clearly see in the window below it, the file does exist. I find this to be very strange, especially since, if you look at the script, the file size check takes place at the end of the script, long after the backup takes place.
Below I have posted the script so that it can be easily modified by anyone attempting to help me:
timedate=`date '+%d-%B-%Y-%H:%M'`
echo "-------------- $timedate --------------" >> /home/clucky/MinecraftServers/backup.log
echo "[`date '+%H:%M'`] Starting Minecraft Backup" >> /home/clucky/MinecraftServers/backup.log
nice --adjustment=19 tar -zcpf /home/clucky/MinecraftServers/.backups/Backup-$timedate.tar.gz \
--directory /home/clucky/MinecraftServers/ \
--exclude=SkyBlockkit \
--exclude=Tekkit \
--exclude=Vanilla \
--exclude=test \
--exclude=Zflocco_LP \
--exclude=Mortuus/plugins/dynmap/web --exclude=Mortuus/plugins/AutoSaveWorld/backups --exclude Mortuus/CraftBukkitVersion --exclude=Mortuus/orebfuscator_cache --exclude=Mortuus/plugins/#Removed --exclude=Mortuus/server.log \
--exclude=Frisnuk/plugins/dynmap/web --exclude=Frisnuk/plugins/AutoSaveWorld/backups --exclude Frisnuk/CraftBukkitVersion --exclude=Frisnuk/orebfuscator_cache --exclude=Frisnuk/plugins/#Removed --exclude=Frisnuk/plugins/#AwaitingUpdate--exclude=Frisnuk/server.log \
--exclude=dailybackup.log \
--exclude=.backups \
--exclude=backup.log \
--exclude=backups.log \
--exclude=backupscript.sh \
--exclude=dailybackup.sh .
echo "[`date '+%H:%M'`] Finishing Minecraft Backup" >> /home/clucky/MinecraftServers/backup.log
#Purge files 3 days old
echo "[`date '+%H:%M'`] Purging Old Backups" >> /home/clucky/MinecraftServers/backup.log
find /home/clucky/MinecraftServers/.backups* -mmin +4320 -exec rm {} \;
echo "[`date '+%H:%M'`] Purging Complete" >> /home/clucky/MinecraftServers/backup.log
#Read back file size
filesize=$(ls -lah home/clucky/MinecraftServers/.backups/Backup-$timedate.tar.gz | awk '{ print $5}')
echo " Total Compression Size: $filesize\n" >> /home/clucky/MinecraftServers/backup.log
Thank you in advanced for your assistance, and if you need any more information, please do ask.