The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Originally a question, figured it out, thought I'd share.
To automatically make a backup of your database using cron: Code:
#! /bin/bash # Automated database datestamp backup mysqldump --opt -Q -u dbusername -pPassword dbname > /path/to/backups/`date --iso-8601`.sql
With the proper information. Note that there is no space between -pPassword, it's intentional. Then replace "/path/to/backups/" with the actual path that you want to put them in. Make sure the directory exists. Put the backup.sh file in the appropriate cron folder. I'm running mine weekly, so mine is in /etc/cron.weekly/. CHMOD it +x (chmod +x backup.sh) Output of it is a database file, named (the date).sql. Putting it in cron.weekly will run it every Sunday night at Midnight, and give you a file that looks like this: Code:
[cron.weekly]# sh backup.sh [cron.weekly]# ls /home/backups/ 2006-01-13.sql [cron.weekly]# |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|