Status
Not open for further replies.

FancyPants

Active Member
1,265
2009
2
0
I need help setting up a cron job to backup the db at 00:00 and 12:00 everyday and e-mails it to me. Just like how you back it up through the Maintenance tab in the AdminCP
 
8 comments
I can write a sh script if you want,
to automatically backup the database,
Compress it
than remote upload it to any ftp of your choice.. @ $5.

Ofcourse, you shall have ssh access to the server for that... :)
 
Code:
crontab -e
will open the crontab file.


syntax of it

* * * * * this is my command
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)

and alternatively you can use

@daily /path/to/backup/foo.sh

which will call the scrript foo.sh daily ( donn't forget to give the script executable permissions )
 
Status
Not open for further replies.
Back
Top