Version: 1.0.2, by Lynne
Developer Last Online: Oct 2022
Category: Administrative and Maintenance Tools -
Version: 3.6.x
Rating:
Released: 03-07-2008
Last Update: 02-19-2009
Installs: 15
Re-useable Code Additional Files
No support by the author.
This is a script meant to run as a Scheduled Task to backup your files if you have your attachments, avatars, etc. in the file system. I have been running it for a couple of years now and given it to a few other vb admins and figured I should share it here as my first Mod. I found the basic part of the script somewhere online a couple of years ago and modified it to work with vbulletin.
Installation:
Download the file and modify the variables at the top of the file. The $backupdir should be an absolute path to a folder you wish to backup. Make sure you have a trailing "/" in the path. The $backupto variable is the absolute path to the folder for your backups. It should also have a trailing "/" in the path. Once you fill in those variables, upload the file to your "includes/cron/" directory and go to your Admin CP > Scheduled Tasks > Add New Scheduled Task and create a new task to run the script. I run mine everynight (as seen in the attachment).
Notes:
The script I have attached is made to backup three different directories. You may add more or take away some. But, make sure if you add more at the top ($backupdir4, $fileprefix4) that you add them to the backupsus call. I used to have these variables set as globals in the function, however that stopped working for me after my last upgrade and instead of figuring out if this was a server issue, I simply changed the script to accommodate the change.
I have heard that some servers do not allow the use of the passthru() function. I can't help with that as I really don't know anything about servers and their personalities. Also, I assume this will work with windows servers also, but I can't help with that either as I have absolutely no experience with windows servers. This works for me and I hope it works for you to. I'm big on having backups around as it helps me sleep better at night.
Update: 1.0.1 - I forgot a semi-colon at the end of the $backupdir lines
1.0.2 - was: $backupattach = "cd $backupdir2;
s/b : $backupattach = "cd $backupdir3;
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Should be easy enough to combine both scripts, though.
Probably, however I know that I worry about server load and I like to space out the times that I run these sort of server intensive scripts. So, I would end up separating the database backup part out anyway to run it at a totally different time.
I don't see why not. - it's very, very basic. The part I would check out is the log_cron_action and see if that function existed back then. I never ran 3.5, so I can't tell you from experience.