View Full Version : Automatic DB Backups?
Koutaru
05-07-2003, 01:07 AM
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!
Erwin
05-07-2003, 02:14 AM
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
Koutaru
05-07-2003, 02:28 AM
:) thanks Erwin, I'll definately try that
Koutaru
05-11-2003, 10:18 PM
Hmmm it does backup except database.sql is 0 KB
Oo;
Erwin
05-11-2003, 10:46 PM
Did you make the directory you are saving to CHMOD 777?
Koutaru
05-12-2003, 12:02 AM
:) of course
but I put it in my /admin directory
would that be a problem?
filburt1
05-12-2003, 12:39 AM
No, but run the command directly from SSH first to make sure it's working.
Erwin
05-12-2003, 02:24 AM
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.
filburt1
05-12-2003, 11:08 AM
.htaccess stuff won't be a problem with cron jobs because they're not related to Apache. :)
Jacko
05-12-2003, 07:41 PM
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??
Erwin
05-12-2003, 11:48 PM
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.
gmarik
05-17-2003, 09:44 PM
Can it be done if I don't have cPanel?
But my HiveMail has a cron file... doen't understand a thing about that...
Koutaru
05-19-2003, 01:19 AM
05-12-03 at 03:41 PM Jacko said this in Post #10 (https://vborg.vbsupport.ru/showthread.php?postid=394254#post394254)
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??
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.