vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Administrative and Maintenance Tools - vB Database Backup (Lite) (https://vborg.vbsupport.ru/showthread.php?t=201319)

Nadeemjp 01-21-2009 11:39 PM

*uninstalled*

starli 01-22-2009 08:16 AM

-fixed- ^^

Yonatan 01-26-2009 04:53 PM

I edit "mysqlbackupconfig.php" - to:
PHP Code:

<?php
/*
<!-- $Header: d:\cvs/3.8/Auto-backup/includes/mysqlbackupconfig.php,v 1.1 2008/10/05 15:33:17 pem Exp $ -->
Auto-Backup (Lite) for vBulletin 3.8 - Paul M - v 3.8.001
This lite version is adapted from the original 3.0.x version by Trigunflame.
*/
// ---------- Main Options, alter these to suit your set-up ----------//
  // Combine all tables into one backup file
  
$backup['COMBINE'] = 1;  // 0 = No, 1 = Yes
  // Close Forum during Backup (not recommended)
  
$backup['SHUTDOWN'] = 0;  // 0 = No, 1 = Yes
  
$backup['MESSAGE'] = "The Forum is closed because a database backup is in progress.";
  
// File Saving Information
  
$backup['DATE'] = 'Y-M-d';  // Backup file date format (See http://uk.php.net/date)
  
$backup['PREFIX'] = 'Forum-';  // Backup file prefix, applied to all files
  
$backup['DUMP_PATH'] = './backups/';  // Path to backups folder, must have a trailing slash, folder must be writable.
 
// ---------- Other Options, do not alter unless you understand what you are doing ----------//
  // Backup Options 
  
$backup['LOCK'] = 0// Lock Tables during dump 
  
$backup['REPAIR'] = 1// Repair & Optimize Tables before dump
  // Backup Type To Use
  
$backup['TYPE'] = 2// 1 = Only Specified Tables, 2 = All except Specified Tables
  
$backup['TABLES'] = array(); // Table List - e.g. array('table1', 'table2')
  // Backup Optimizations 
  
$backup['INNODB'] = 0// Set to 1 if you have Innodb Tables 
  // Execution Function 
  
$backup['COMMAND'] = 'exec'// exec, system or passthru
?>

and i change "CHMOD" to "backups" folder to "0777" - and i still get this error:
Quote:

An error occured during the Backup : Could not open Destination SQL file for writing.
help please,
yonatan :)

nectons 01-27-2009 12:27 AM

Hi Paul.

It works perfect 2 weeks now without any problem. I have an accident yesterday and i decide to make a restore. Everething worked perfect. ONLY one problem. All my styles messed up.. lost backgrounds, buttons.. everething. I didnt know why.

But.. after a rebuilt style in meintanance all my styles worked again perfect. Is this a problem? Should i have to worry for anything?... I lost many threads/posts and about 50 new registered users.. I dont want to loose more.

Please help me.

And another one question. Is anything i can do to take backup every 3 or 6 hours? Or.. is it possible to takes backups every one hour BUT to delete backups older than 2 days for example? I found if i choose asterisk at month/week/day and choose asterisk at a hour it takes backups every one hour.

But its gonna full the space at my server and maybe it is heavy too.. Can you please tel me if anyway to take backups every 3 or 6 hours or like i said even more frequently at 1 hour but i don have to delete anything my self ?... I mean to somehow the cron to delete backups older than 2 days?

yingzhou 01-28-2009 11:18 AM

Quote:

Originally Posted by Yonatan (Post 1725377)
I edit "mysqlbackupconfig.php" - to:
PHP Code:

<?php
/*
<!-- $Header: d:\cvs/3.8/Auto-backup/includes/mysqlbackupconfig.php,v 1.1 2008/10/05 15:33:17 pem Exp $ -->
Auto-Backup (Lite) for vBulletin 3.8 - Paul M - v 3.8.001
This lite version is adapted from the original 3.0.x version by Trigunflame.
*/
// ---------- Main Options, alter these to suit your set-up ----------//
  // Combine all tables into one backup file
  
$backup['COMBINE'] = 1;  // 0 = No, 1 = Yes
  // Close Forum during Backup (not recommended)
  
$backup['SHUTDOWN'] = 0;  // 0 = No, 1 = Yes
  
$backup['MESSAGE'] = "The Forum is closed because a database backup is in progress.";
  
// File Saving Information
  
$backup['DATE'] = 'Y-M-d';  // Backup file date format (See http://uk.php.net/date)
  
$backup['PREFIX'] = 'Forum-';  // Backup file prefix, applied to all files
  
$backup['DUMP_PATH'] = './backups/';  // Path to backups folder, must have a trailing slash, folder must be writable.

// ---------- Other Options, do not alter unless you understand what you are doing ----------//
  // Backup Options 
  
$backup['LOCK'] = 0// Lock Tables during dump 
  
$backup['REPAIR'] = 1// Repair & Optimize Tables before dump
  // Backup Type To Use
  
$backup['TYPE'] = 2// 1 = Only Specified Tables, 2 = All except Specified Tables
  
$backup['TABLES'] = array(); // Table List - e.g. array('table1', 'table2')
  // Backup Optimizations 
  
$backup['INNODB'] = 0// Set to 1 if you have Innodb Tables 
  // Execution Function 
  
$backup['COMMAND'] = 'exec'// exec, system or passthru
?>

and i change "CHMOD" to "backup" folder to "0777" - and i still get this error:


help please,
yonatan :)

you must creat a folder name: $backup['DUMP_PATH'] = './backups/

not backup. :D

Yonatan 01-28-2009 11:24 AM

Quote:

Originally Posted by yingzhou (Post 1727097)
you must creat a folder name: $backup['DUMP_PATH'] = './backups/

not backup. :D

Oops :S
by mistake i wirte "backup" instead of "backups".
but, in backups folder. it's make folders(like: 2009-Jan-28 and etc), but not sql files.

Lautaro 01-29-2009 07:56 AM

I have a few questions about this modification:

1.- How do I secure the 'backups' folder?? ( CHMOD settings )
- is this a good configuration of it?
https://vborg.vbsupport.ru/attachmen...1&d=1233222781

2.- Where do i change the time when I want the backup to be made?

3.- Is there any way to make the backups path outside the public_html folder?
when saying outsite public_html i mean here:
https://vborg.vbsupport.ru/attachmen...1&d=1233222781
making a folder there called backups..
if yes, how will the backup path be?
my forum is located here: '/public_html/forum'

Thats all.

FCDobbs 01-29-2009 02:47 PM

Paul, thank you for this mod.
It is working fine for me.

One issue I have is with the number of backups being taken/stored (1 per day).
After a few weeks, my site hosting company is going to start charging me
for the extra disk space I am using.

I know you have no plans to modify this Mod and I don't expect you to.

But could you advise as to how I might be able to set up a CRON job to delete folders which are more than 7 days old ?

Thanks

JonUrban 01-30-2009 12:59 AM

Dumb question 101:

I installed the product, followed the directions. However, I am not sure how to

4. Alter the timing of the cron job to suit.

I'm not a real web expert, just a plodder. Can someone point me in the right direction?

THANKS

Yonatan 01-30-2009 05:14 AM

Quote:

Originally Posted by JonUrban (Post 1728640)
Dumb question 101:

I installed the product, followed the directions. However, I am not sure how to

4. Alter the timing of the cron job to suit.

I'm not a real web expert, just a plodder. Can someone point me in the right direction?

THANKS

Go to ACP -> Scheduled Tasks -> Scheduled Task Manager - Now edit "Automatic Database Backup for vBulletin 3.8" and save!

Good luck ;)

Vinyljunky 01-30-2009 12:49 PM

Quote:

Originally Posted by FCDobbs (Post 1728176)
But could you advise as to how I might be able to set up a CRON job to delete folders which are more than 7 days old ?

Thanks

I'd like to be able to do that too :)

Paul M 01-30-2009 03:49 PM

You could just change the time format in the config to use the day of the week, this is what I do so I only ever have 7 folders (Monday to Sunday).

Code:

$backup['DATE'] = 'l'; // Lowercase 'L'

FCDobbs 01-30-2009 03:56 PM

Paul, never mind my earlier request.

I have successfully built a VB script (Windows Scripting Host) which:

1. Invokes Windows FTP command to connect to my site host server and list out all the folder names for all the backups.
2. Examines these folder names (each is actually the date the folder was created),
does a numerical check against todays date, and stores the information for all folders which are more than 7 days old, and stores the information for all folders which are 7 days old or less.
3. Loops through all the folder names which are more than 7 days old, and creates/runs a Windows FTP job to delete each folder.
4. Loops through all the folder names which are 7 or less days old (I want to copy them to my computer for a second backup), and copies the file in each one to my computer.
Actually, it first checks to see if the folder already exists on my computer.
If so, it ignores copying that file; if not, it creates that folder, then copies the file over.
This is also done via a Windows FTP job.

Now I merely schedule this task to run every day on my computer, and presto... it all runs unattended for me, and does exactly what I want.

Perfect.

By the way.... if anyone would like a copy of my script, just PM me and I'll be happy to send it to you.
Of course, it will be "bare bones"... you will have to insert/modify the code to accommodate your FTP ID and password, and your server backups folder structure, and your PC folder structure. But is is significantly commented so you should be able to do this quite easily.

Cheers,

Phaedrus 01-30-2009 05:41 PM

Quote:

Originally Posted by Yonatan (Post 1727102)
Oops :S
by mistake i wirte "backup" instead of "backups".
but, in backups folder. it's make folders(like: 2009-Jan-28 and etc), but not sql files.

Check inside the folders.

Vaupell 01-30-2009 06:15 PM

well installed, did force cron to run a backup worked like a charm
downloaded backup aswell.

this might be a FAQ- if so, could u add it to your post for mySQL newbs like me.
How do i restore the backup if i needed to, i dont right now, but would be nice to
know when i get to the point where i need to restore ;)

I got phpmyadmin acces to mySQL server at the webhost. ;)

no rush..

PS: Installed ;)

FCDobbs 01-30-2009 06:36 PM

Paul, thanks for the hint.

At least now, I will only have 7 days stored.

And I won't have to use the script I built.

JonUrban 01-30-2009 08:40 PM

Thanks Paul M! I just installed and ran a 'run now" and it worked like a champ! Very nice! Marked as installed and nominated.

Yonatan 02-06-2009 11:38 AM

Quote:

Originally Posted by Phaedrus (Post 1729297)
Check inside the folders.

I was check.
the folders is empty :(

BlackJacket 02-06-2009 03:28 PM

where do i create the "backups" folder? Which directory?

Yonatan 02-09-2009 09:39 PM

Quote:

Originally Posted by NittoMOD (Post 1736213)
where do i create the "backups" folder? Which directory?

In public_html


- - - - - - - - -

Paul.
Pleash help me, in my problem.
Thanks,
yonatan

bam-met 02-10-2009 06:33 AM

Thank you very much - works GREAT...

Yonatan 02-10-2009 07:40 PM

I try to backup(manually) in Safe Mod, and i get this error:
Quote:

Could not open Destination SQL file for writing
But, when i turn-off the Safe Mod, everything work perfect.


What i should to do, that i will can use on the mod in Safe Mod?


Thanks,
Yonatan

Paul M 02-10-2009 10:05 PM

Nothing, dont use safe mode.

grecostimpy 02-13-2009 11:15 PM

Hi, I have a 2GB database (big board). Just want to ensure that this is ok to use with a large db. I'd love to use an automated system like this. Reading through the threads in this, the forum does not get turned off during the backup?

Thank you for your assistance. :)

Paul M 02-14-2009 01:21 PM

There is no limit built into this, so as long as your php does not timeout there is no reason you can t use it with a 2GB database.

hydn 02-15-2009 08:36 AM

windows server.

Path to backup folder is set to:
'D:\inetpub\wwwroot\forums\backups\'

I get:
"An error occurred during the Backup : Could not open Destination SQL file for writing."

Even though permissions are set in "backups" folder created in forums dir.

My vb config path is set to:
'D:\inetpub\wwwroot\forums\';

Whats missing?

EDIT: Tried creating folder "D:\backups\"
And changed config to:
'D:\backups\'

Sam error.

Paul M 02-15-2009 11:32 AM

Sorry, I cant solve indivdual server configuration problems.

y2krazy 02-16-2009 04:06 PM

Installed and worked the first time! Awesome!!

~ Sean

hydn 02-16-2009 06:01 PM

uninstalled

y2krazy 02-16-2009 06:47 PM

Quote:

Originally Posted by hydn (Post 1746129)
uninstalled

Why? Did you run into any issues?

~ Sean

grecostimpy 02-16-2009 09:42 PM

Quote:

Originally Posted by Paul M (Post 1743836)
There is no limit built into this, so as long as your php does not timeout there is no reason you can t use it with a 2GB database.

Thank you for that answer. Is it safe on a database this large to keep the forums open while this runs? Mind you it is a very busy website 24/7. Thanks again for your assistance.

jl255 02-17-2009 01:33 AM

tks for this mod!

been running this for a few weeks now, and i realize that the backed up db is 2gb while the db size indicated in cpanel is close to 4gb. Does that seem right?

Paul M 02-17-2009 04:04 PM

Quote:

Originally Posted by grecostimpy (Post 1746284)
Thank you for that answer. Is it safe on a database this large to keep the forums open while this runs? Mind you it is a very busy website 24/7. Thanks again for your assistance.

It wouldbe better to close it if you can, but I would not advise using the option in this mod as it can sometimes fail to open it again.

Quote:

Originally Posted by jl255 (Post 1746451)
tks for this mod!

been running this for a few weeks now, and i realize that the backed up db is 2gb while the db size indicated in cpanel is close to 4gb. Does that seem right?

Sorry, I cannot comment on database sizes.

wipedout 02-23-2009 04:03 PM

i have serious conserns and serious problems i require serious help!

i do realise that your exact words were: "* I will not be adding anything new to this modification. " but i beg you reconsider to add gziping of the sql files after the backup is done it would shorten down the overall backup sizes with about 75% which if someone like me who wants 4 backups a day would help alot making my backups go from 120mb per day and rather down to 45mb a day.

~Wipedout
TFD Administrator

Paul M 02-23-2009 05:00 PM

My backups are way bigger than that, why is it a serious problem ?

hydn 02-23-2009 05:48 PM

Quote:

Originally Posted by wipedout (Post 1752423)
i have serious concerns and serious problems i require serious help!

Good luck with getting help. Maybe now you will. Lets hope its not an "individual server configuration" you have but that some how you have a clone setup because all servers must be the same it seems.

chingon 02-24-2009 02:23 AM

Thank you very much Paul M, your work is greatly appreciated.

hearts 02-27-2009 03:59 PM

Update - I had to add 'httpdocs'

/httpdocs/backups/

it works now.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Edited: I found answers to my post. Now I get an error:
"An error ocured during the Backup : Could not open Destination SQL file for writing. "
I read another post above that said they got this message and changed to not run in safe mode.
How do I turn off Safe Mode?
/backups/ is 0777

Thanks.
Beth

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Installation instructions below. I have done #1,2,3.

How do I do #4? Where do I go to do that?
How do I start the backup? (I did create a /backups/ directory)

Thanks,

Beth
~~~~~~~~~~~~~~~~~~

Installation.

1. Copy all files in the 'includes' folder to the server.

2. Set your choice of options in the mysqlbackupconfig.php file.

3. Upload the product XML via the Product Manager.

4. Alter the timing of the cron job to suit.

wipedout 02-28-2009 01:37 PM

Quote:

Originally Posted by Paul M (Post 1752474)
My backups are way bigger than that, why is it a serious problem ?

its not a serious problem, but reducing sizes of backup would be nice.

WildFire.ca 03-02-2009 08:00 PM

Thank you sir, nice little mod.
I am having a little problem running the mod. Its giving me this error when I try to run the process. An error occurred during the Backup : Could not open Destination SQL file for writing.


All times are GMT. The time now is 08:16 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01826 seconds
  • Memory Usage 1,858KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete