Hi have a little code file to run a backup:
Code:
#!/bin/bash
today="$(date +%a-%d-%B-%Y)"
month="$(date +%b-%Y)"
file="/mnt/backupdir/backupdir/$month/"
if [ -d $file ]; then
echo "folder OK"
else
echo "foer lage folder"
mkdir $file
echo "laget folder"
fi
echo "over mysql dump"
mysqldump -u root -p5******** database > /mnt/backupdir/backupdir/$month/$today.database-backup.sql
cd /srv/www/appfolder/
tar czf /mnt/backupdir/backupdir/$month/$today.attachments-backup.tar.gz attachments
This have worked on the old server but now I get:
Quote:
sh /home/scrips/backupscript2
: command not foundscript2: line 5:
: command not foundscript2: line 6:
/home/scrips/backupscript2: line 21: syntax error: unexpected end of file
|
Have tried to search for a solution, but found no match that helped me.
regards and thanks for help!!!