Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ Cron Jon Syntax?

Posted by: marcodeluca Feb 16 2011, 08:00 AM

Hi there, I'm looking for some help with some cron job syntax. If you can help, I appreciate your time!

First, I'm setting up a bunch of cron jobs using the cPanel cron job module. I currently have a bunch of cronjobs backing up my databases, looks like this ( and works fine ): mysqldump -u worklabs -pXXXXXXX worklabs_one | gzip -c > /home/worklabs/backup/backup_worklabsone.sql.gz

So I end up with a list of zipped SQL files in a folder called BACKUP, which is what I want. It's the next step that I'm having troubles with: I want to zip that entire BACKUP folder, append the current date to it, and place that zipped folder into another folder, backup_archive. Afterwards I can set up a local script to retrieve the file using SSH.

I can start with something like this: gzip -r /home/worklabs/backup

I'm having troubles getting the syntax right for the process of appending the date and moving the zip into another folder. Any suggestions?


Powered by Invision Power Board (
© Invision Power Services (