![]() |
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?? |
All times are GMT. The time now is 08:09 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:
|