The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Database backup
Does anyone know how to do an automatic back up of the database for vB 5?
|
#2
|
|||
|
|||
This doesn't have to be done inside of vBulletin, you can simply setup a cronjob to execute a bash file to run mysqlbackup every X hours/days to make a backup to a certain location.
Then you could even execute a tool such as zip in the bash file to zip the backup and save some storage. |
Благодарность от: | ||
Lynne |
#3
|
|||
|
|||
I have tried this but I dont have permission with this script. I can run just the mysqldump command manually and it works but as soon try to run the backup.sh script with the code below it says I dont have permission. Any ideas on how fix this? Thank you for your help.
#!/user/bin/sh mysqldump -u root -p pwd --opt db1.sql > /respaldosql/db1.sql |
#4
|
|||
|
|||
Try chmodding the file to allow execution: chmod u+x file.sh
|
#5
|
|||
|
|||
I am now getting
-bash: ./backup.sh: /user/bin/sh^M: bad interpreter: No such file or directory and with out /user -bash: ./backup.sh: /bin/sh^M: bad interpreter: No such file or directory --------------- Added [DATE]1442944340[/DATE] at [TIME]1442944340[/TIME] --------------- Let me give you the actually code that I am using. Maybe this will help. #!/bin/sh mysqldump --no-create-db=true --opt -Q -h dbxxxxxxxx.db.1and1.com -u dbxxxxxxxxx -pxxxxxx dbxxxxxxxxxx > files/jaxreef.org`date +%m%d%y%H%M`.sql find files/jaxreef* -mtime +5 -exec rm {} \; |
#6
|
|||
|
|||
That happens when you create a new file on Windows, you have to open the backup.sh file in your editor and save it with "Unix" line endings.
|
#7
|
||||
|
||||
Quote:
|
#8
|
|||
|
|||
Dave thank you for the help. It works now.
|
#9
|
|||
|
|||
Just in case anyone else is looking for how to do this.... I created a thread:
https://www.christforums.org/forum/e...-code-for-cron |
Благодарность от: | ||
Lynne |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|