I am running three minecraft servers, 40-60 online users in average spread over the daemons, on a debian 6.0 squeeze root server.
I'm trying to configure a cronjob backup and wrote a small shell script to just compressing a single (at the moment 7.1 gb of size) directory to a specific directory.
tar -cvzf /home/backups/mcsrv1/mcsrv1-full-$DATE.tar.gz /home/mcsrv1/
But, through the structure of some plugins installed in each mc-server there are thousands and thousand of small files and empty directories like:
Now, when I'am starting the script, it takes almost 45 to 60 minutes to backup the files and directory structure and it causes MASSIVE server lags. It is almost unplayable at this time.
Even if I just want to look how big the directory is with
du -sh /home/mcsrv1
the server almost (if not) crashes.
i7 2600, 32GB RAM, 3TB SATA 6GB/s, root server (physical machine)
Am i doing something wrong with the script or did i configure the server wrongly?
Looking with the command "top" when the script is running don't show any suspicios entries.
Any advice could help.
I am trying to run the script when the server is empty at 5 am. but the servers is never really empty, though.
I don't want to shut the mc-servers down in order to do a backup.
The tarball command is just the main part of the backup, the script itself is a little bit more. E.g. it displays a warning to all players and turns off automatic saving operations during the backup process.