On my server I have three directories that I need to backup, the Database directory, the game files directory and another directory.
With the gamefiles directory it contains the main directory, and then multiple sub directories inside there, then with each sub directory has more subdirectories etc.
Currently I am using the following script
echo "TCAdmin Backup Starting"
#TCAGAME (all gameserver files)
tar -zcvf tcagame.tar.gz tcagame
mv tcagame.tar.gz /home/backups
#TCADMIN Database (for SQLi)
tar -zcvf database.tar.gz Database
mv database.tar.gz /home/backups
#MINECRAFT BACKUP (for mod purposes)
tar -zcvf minecraft.tar.gz minecraft
mv minecraft.tar.gz /home/backups
echo "TCAdmin Backup Completed"
All it's doing is backing up the folders, and I'm unsure in how to get the WHOLE directory compressed, including sub folders, files, etc.
Can anyone tell me where I'm going wrong, this is my first .sh script.