I have a server in Amazon EC2 that I run a backup script on with cron. However, it is not working. To test out if cron is working, I did the following:
Logged into the server and switched to root. I then ran "crontab -e".
Im trying to create a basic mysql dump cronjob in linux.
$ crontab -l
* * * * * sh /tmp/script.sh
then in cat script.sh
$ /home/mysql/bin/mysqldump dbase > /home/backup/date.sql -u root -p root
This will create and overwrite a file date.sql but now how can i get it so it has the date+timestamp as I want to do this every minute.
so i would like it to save the date-.sql rather
h
I want to do a complete server backup.
I already have my backup script copying all of the html/php files for the web app, and the mysql databases, placing them into a .tar.gz file.
How can I add the crontab files to that backup?
Whenever I save the crontab, it goes to /tmp folder.. and when I check that folder immediately afterwards, it is empty.
I uploaded the cronjob but it wont backup my database.
I have the folder "Backup yzT Jan-01-2013". I've made also a script for do a backup everyday.
The problem I'm facing is how to rename the folder day by day according to date? Get the new name is easy, it's just
"/home/yzT/Backup yzT `date '+%b-%d-%Y'`"
However how can I select the folder "Backup yzT Jan-01-2013" exactly? Because every day it will be different.
I'm running a bash script on an ubuntu 12.04 through cron. The script works fine for a few weeks (runs daily backups of websites, mysql databases, and copies to Amazon S3).
However, twice now I've noticed that backups stopped happening. Both times the backup script (backupscript.sh) located in my home folder was no longer there.
i have created a file named "backups.sh" to take a backup of mysql db.
/usr/bin/mysqldump -A -u [username] -p[password] | gzip > /backups`date +%m_%d_%y`.gz
And set crontab.
10 * * * * /root/backups.sh
But didnt take backup.
i had run /etc/init.d/cron start.
i use ubuntu
what the problem with me????????any help...
I am trying to create a tar backup script.
I'm running a combination backup script from a root cron on my Ubuntu 10.04 LTS Server.
The root cron looks like this:
# m h dom mon dow command
0 1 * * 2-6 /home/cbhiadmin/archive
It's executed as it's expected. The archive command kicks off several individual facility backups.