Log in

View Full Version : 2.3 Daily Backup


gsk8
08-08-2003, 12:55 AM
Is there a good hack that can do this while you sleep?

Erwin
08-08-2003, 01:52 AM
Just use a cronjob to copy your database files and php files to a backup directory. That's what I've been doing. You would need access to SSH.

Gary King
08-08-2003, 02:36 AM
Might help:

http://www.vbulletin.com/forum/showthread.php?t=4256&highlight=cron

Dean C
08-08-2003, 10:33 AM
I don't know how it's done but I asked my host to set up a daily cron to backup my database at midnight every night :)

- miSt

gsk8
08-09-2003, 11:37 AM
Mist, who is your provider? They actually did it? No charge or hassle?

Dean C
08-09-2003, 09:46 PM
I have my contacts so no ;)

joeboo
08-10-2003, 06:58 AM
I dunno, i've heard that using cron jobs isnt such a good idea. If users are online at the same time that the backup is downloading, it can corrupt or delete something. In my case, it deletes random threads and users if I have the cron job on. :/

Erwin
08-10-2003, 07:58 AM
Today at 05:58 PM joeboo said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=424780#post424780)
I dunno, i've heard that using cron jobs isnt such a good idea. If users are online at the same time that the backup is downloading, it can corrupt or delete something. In my case, it deletes random threads and users if I have the cron job on. :/

Backing up using cron jobs or any other method will always have some small risk in it if you keep your forums open during the backup. If you automate your backup, then obviously you are expecting to keep your forums online at that time as well. You minimize problems by backing up during off-peak times.

For myself, instead of exporting the database, I backup the actual mysql database files. :)

wooolF[RM]
08-10-2003, 11:28 AM
]Today at 10:58 AM Erwin said this in Post #8 (https://vborg.vbsupport.ru/showthread.php?postid=424786#post424786)For myself, instead of exporting the database, I backup the actual mysql database files. :) [/B]

Can we please get some more details?

example of how do *I* backup my database (+250Mb w/o any attached files)

mysqldump --opt -h localhost -uuser -p database_name | gzip -c --best > `date +%d_%m_%y`.Forum.SQL.gz

Worked fine in past 1.5-2 years... We moved twice and both times import/export worked flawessly

wooolF[RM]
08-11-2003, 10:25 AM
*bump*

wooolF[RM]
08-13-2003, 08:42 PM
]get back Erwin :p

Erwin
08-14-2003, 09:19 AM
What are you asking me for? :) If your backup and restore is working, you don't need my method. Do you want to know how to copy a directory in cron? Just use the normal cp commands. You need to find the path for your database - usually in /etc/mysql/databasename and copy it to a /backup directory.

wooolF[RM]
08-14-2003, 05:42 PM
]oh, that way... O.o never thought of it... o.O
thanx :)

Erwin
08-15-2003, 12:09 AM
If you do it my way, when you restore you need to run a chown command to give ownership back to mysql. I use my way since it's foolproof. Mind you, it may take much more hard disk space unless you tar it.