Cron Job Script

Backup and data protection discussion at its finest.
Post Reply
mdof2
Posts: 79
youtube meble na wymiar Warszawa
Joined: Mon Nov 18, 2013 6:59 pm

Cron Job Script

Post by mdof2 »

I have a script that backs up sql databases and runs as a cron job which I'd like to add to my NAS to back up a few of the databases I use / run regularly.
Is there a n00bs FAQ on adding cron jobs anywhere?

(or is there an alternative method for regularly backing up sql databases?)

Thanks-
ho66es
Posts: 476
Joined: Wed Mar 13, 2013 5:38 am

Re: Cron Job Script

Post by ho66es »

my scripts are in http://forum.asustor.com/viewtopic.php? ... ilit=mysql crontab works as normal when you ssh to the server and run crontab -e

for me i use

# backup prep
10 1 * * * /volume1/misc/mysqlbackup.sh
608t
mdof2
Posts: 79
Joined: Mon Nov 18, 2013 6:59 pm

Re: Cron Job Script

Post by mdof2 »

Thanks.
I'd really like to use the script that I currently have as I know it, what it does, and so on.
Backs up databases, weekly, keeping record of the prior backup, etc.

I guess my biggest issue is where to put the script to run as a cron job, and having it execute weekly.

Thanks again- Appreciate the help.

Here is the script I'm using:
http://sourceforge.net/projects/automysqlbackup/
ho66es
Posts: 476
Joined: Wed Mar 13, 2013 5:38 am

Re: Cron Job Script

Post by ho66es »

I created a share for scripts and other odds and sods called misc, thats where I keep mine. Then its just a matter of reading up on crontab and how to use vi. When you call crontab -e it brings up the crontab in vi and you can change and add as you see fit.

There are loads of help pages out there with better hints and tips on editing crontab and adding tasks than I could give you.
608t
mdof2
Posts: 79
Joined: Mon Nov 18, 2013 6:59 pm

Re: Cron Job Script

Post by mdof2 »

Thank you Sir. I appreciate it.
I'l read up on crontab, and editing it to my liking in nano or vi.
I had attempted to add the script to the crontab folder, and got a permission denied.
I'll read up on crontab.

Again, appreciate the direction pointing.
Post Reply

Return to “Backup and Data Protection”