![]() |
Automatic DB Backups?
I know sometimes I'm not at the forums and I know I don't make daily backups when I don't have the time
Is there any way to make it so I can save a backup on my server every single day (at 12am) and every day it will overwrite the previous day's backup Should I just do a cron job =/ ?? :) this would be greatly appreciated Thanks! |
Cron job.
Make it run this line in SSH as a cronjob, either in crontab or in your cron.daily directory (or in CPanel if you have that): mysqldump --opt -u USERNAME -pPASSWORD DATABASE_NAME > /home/xxxxxxx/db/database.sql |
:) thanks Erwin, I'll definately try that
|
Hmmm it does backup except database.sql is 0 KB
Oo; |
Did you make the directory you are saving to CHMOD 777?
|
:) of course
but I put it in my /admin directory would that be a problem? |
No, but run the command directly from SSH first to make sure it's working.
|
You shouldn't really put it in a web-accessible directory for security reasons, unless you .htaccess the directory, but then you might get problems with permissions etc.
|
.htaccess stuff won't be a problem with cron jobs because they're not related to Apache. :)
|
i am also having problems with this. i have run the cron job and it has backed it up but again the file size reports 0..??
all directories to the backup folder i am using is CHMOD to 777..?? any ideas?? |
Are you using the correct username, password and db name? Try the command line first to make sure it works before using it as a cron.
|
Can it be done if I don't have cPanel?
But my HiveMail has a cron file... doen't understand a thing about that... |
Quote:
that's the problem I'm still having, I might just try a script from hotscripts.com :) I'd really like to just set up a cron job but it's not working |
All times are GMT. The time now is 07:22 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|