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 Pro (Lite) for vb 3.6 (https://vborg.vbsupport.ru/showthread.php?t=126925)

Paul M 02-07-2007 03:05 PM

Sorry, I have no idea what MysqlHotCopy even is.

I have no plans to make any changes to this in the near future, and any that do get made will be minor.

Eagle Creek 02-16-2007 06:18 AM

Why should I or should't I close down the forums?
Why should I or should't I lock the tables?

Does it make multiple backups? So when there's one in place, does it make a new one?
Can it backup to a FTP?

Paul M 02-16-2007 10:56 AM

1 & 2 - Your choice - there is no should or shouldn't.

3. Backups are date based, so each day you get a new copy, run it twice on the same day and one will overwrite the other.

4. No.

Eagle Creek 02-16-2007 12:24 PM

Loud and clear!

About the closing and locking: is there an advantage to do so?

Sjakie 02-16-2007 02:50 PM

In the setting, should I use this location: /var/www/vhosts/mysite/httpdocs/dbbackup/ or from the root /dbbackup/

And does it also work with PHP 5

Mudvayne 02-16-2007 03:32 PM

Quote:

Originally Posted by Paul M (Post 1158460)
Quote:

Originally Posted by Reven (Post 1152290)
I've added a bit of code into mysqlbackup.php to compress the resultant SQL file with gzip. My database is about 35MB, and it's making it 5MB.

If you don't mind I'll think about borrowing this code and adding some extra options at some point (when I'm not so busy).

Any update Paul ? :).
Quote:

Originally Posted by Sjakie (Post 1183943)
In the setting, should I use this location: /var/www/vhosts/mysite/httpdocs/dbbackup/ or from the root /dbbackup/

And does it also work with PHP 5

/server_root/backup/. Like mine is /home/username/backup/

Yep I'm using PHP 5.2.0 so far its working :)

Paul M 02-16-2007 04:25 PM

Quote:

Originally Posted by Icy (Post 1183970)
Any update Paul ? :).

No, it's very low on my list of things to do.

patrice@patrice 02-18-2007 12:30 PM

Thanks a bunch for this. :up:

I originally had problems because I was timing out when it hit my postindex table, so I just removed that table from the backup list and it works like a charm now.

Thanks again!
Patrice

projectego 02-28-2007 09:38 AM

[high]* projectego clicks install ;)[/high]

SkyCatcher 03-04-2007 03:35 PM

If I read ONE MORE POST about how to set the path correctly or receiving the

Quote:

An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)
Error I'm going to explode!


Setting the correct path for Linux Distributions

Original Line
Quote:

$backup['DUMP_PATH'] = '/path/to/backups/'; // Path to backups folder, with trailing slash
On Linux servers / is the most parent path (i.e. This is the base where everything starts).

You should know the path to your forums. Most people will have a shared hosting account so you need to contact your host (or look into the original email sent to you when you purchased your hosting) to get the path.

If you are on a shared hosting the path names will differ a little but in essense they are the same.

==========================================

A typical path, for example, for suse will be:

Quote:

/srv/www/vhosts/mysite.com/httpdocs/forum
That is the PATH (not web directory) to your forum.



When you log in with FTP you will probably be at


Quote:

/srv/www/vhosts/mysite.com/
OR



Quote:

/srv/www/vhosts/mysite.com/httpdocs/
Depending on how your host has setup your account.


==================================


If you change the original line to something like
Quote:

/mybackups
It's guaranteed to fail because you don't have access to that path unless you have root access to that server (unless you own it - you don't).

==========================================


So how do I actually know where to store the backup files?

You can use . or .. to change directories without knowing the actual path.

You know 100% that the script is in /forum/includes/ (or whatever your forum directory is called).

So let's take you back to YOUR parent base directory.

==========================================

Quote:

../../../
That means you have just gone back 3 directories.


From:
To (remember you have an additional folder like httpdocs, hence 3)

==========================================


In paths, this would be going from:


Quote:

/srv/www/vhosts/mysite.com/httpdocs/forum/includes
To:
Quote:

/srv/www/vhosts/mysite.com/httpdocs/
So now you are at the base directory where you can upload files to the web.


==========================================


So use an FTP program and navigate to your base http folder where you can see the folder to upload files to the web where others can access them (httpdocs for example)


(Before)
Something similar to this...
Code:

/httpsdocs
/httpdocs - This is the folder (or similar) that I mean
/cgi-bin
/test
/stats

now create a new folder called mybackups and CHMOD it to 777




(After)

/httpsdocs
/httpdocs
/mybackups(
This is the folder you created)
/cgi-bin
/test
/stats

==========================================

Now edit the config file and set the path to something like this:
Quote:

../../../mybackups/


The script will automatically change directories and save your files there.

==========================================

If you get the "
(Could not open Destination SQL file for writing.)" Error you need to check to make sure it's set to 777. If you still get the error you may need to change
the path to:


Quote:

../../mybackups/





AND create the folder mybackups inside the httpdocs folder (same directory where /forum is) and CHMOD that to 777.




/forum
/mybackups
(This is the folder you created)
/picturs
/whatever


============================
============================



Nice Hack. Installed and working with no problems. Thanks for this :)


djbaxter 03-04-2007 04:09 PM

Quote:

If I read ONE MORE POST about how to set the path correctly or receiving the

Quote:

An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)
Error I'm going to explode!
:confused:

I'm not sure I understand. So what IS the correct path? :o

SkyCatcher 03-04-2007 04:28 PM

Quote:

Originally Posted by djbaxter (Post 1195560)
:confused:

I'm not sure I understand. So what IS the correct path? :o

*poof* ;)

Kirk Y 03-07-2007 10:50 PM

What's the importance of the postindex table -- is it a necessity to have in a backup or can it be skipped, as I notice my forum hangs and sometimes errors leaving the forum offline when the postindex table is being processed.

Paul M 03-07-2007 11:46 PM

It's part of the vb search system, you don't need to back it up as you can rebuild it from within the ACP.

Kirk Y 03-08-2007 12:12 AM

I just realized that I'd yet to switch to fulltext searching - I thought I did, so that cut my backup size down.

Thanks Paul, I'll remember that.

djbaxter 03-08-2007 12:37 AM

Quote:

Originally Posted by acidburn0520 (Post 1198447)
I just realized that I'd yet to switch to fulltext searching - I thought I did, so that cut my backup size down.

Thanks Paul, I'll remember that.

:confused:

Switching to full text searching cuts the backup size down? I would have thought it would be the other way 'round...

Paul M 03-08-2007 09:48 AM

Nope, indexes are never backed up.

Using FT searching means you can forget the word and postindex tables (or just empty them).

TrIn@dOr 03-08-2007 10:40 AM

Ok, trying it (because needed) for the second time.

Inside my destination backup directory, after running the task manually, a dir is created.

That dir is Y-m-d format, but the task stoped and no SQL is generated.

Error: An error occurred during the MySQL backup. Details (Could not open Destination SQL file for writing.)

The dir is correct set, but why not the sql?

Thanks.

djbaxter 03-08-2007 11:21 AM

Quote:

Originally Posted by TrIn@dOr (Post 1198668)
Ok, trying it (because needed) for the second time.

Inside my destination backup directory, after running the task manually, a dir is created.

That dir is Y-m-d format, but the task stoped and no SQL is generated.

Error: An error occurred during the MySQL backup. Details (Could not open Destination SQL file for writing.)

The dir is correct set, but why not the sql?

Thanks.

That usually means:

1. you haven't set the backup directory to be wirteable, OR more likely

2. you haven't correctly specified the path to the directory: note that this is the "physical" path on your server, not the URL - read previous posts in this thread by Paul M for specific instructions

antiekeradio 03-08-2007 01:20 PM

well; here is what I get.....

Quote:

Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/../../db_backup/2007-03-08) is not within the allowed path(s): (/tmp:/home/etc/etc:/usr/lib/php:/var/etc/etc/etc) in /includes/mysqlbackup.php on line 225
and another 4 times an equivalent error

whatever i fill in the backup dir, the error remains the same....

is there something wrong with the server setup?

djbaxter 03-08-2007 01:41 PM

No, there's something wrong with your path to the backup directory.

antiekeradio 03-08-2007 01:48 PM

what i thought of as really strange is that the path i specify comes back twice within the ( and ), first time after (/tmp:/ and then after :/user/lib/php:/

anyways, i am going to try again (never had this sort of problems with paths before, and i used impex etc)

TrIn@dOr 03-08-2007 01:53 PM

Quote:

Originally Posted by djbaxter (Post 1198699)
That usually means:

1. you haven't set the backup directory to be wirteable, OR more likely

2. you haven't correctly specified the path to the directory: note that this is the "physical" path on your server, not the URL - read previous posts in this thread by Paul M for specific instructions

  1. The directory has 777 of permissions, thats why the Y-m-d directory is created.
  2. The path used is the same used with vBadvanced CMPS (phpinfo), thats why the Y-m-d directory is created too.
Or?

antiekeradio 03-08-2007 03:54 PM

OK well now I am 100% sure I have filled in the directory correctly.

why? it still doesn't work but if i manually add the dir that would be generated for todays backup, it gets deleted after the error messages. same for the sql file for the access table, in that directory.

there's an error somewhere else. either in the script or in the webhost's configuration.
our server runs PHP Version 5.1.6 with MySQL 4.1.14

Paul M 03-08-2007 03:57 PM

Quote:

Originally Posted by antiekeradio (Post 1198769)
is there something wrong with the server setup?

Not exactly, openbasdir is a system in php that restricts what files it can write to, you can only write to files within the paths listed in the error. You really need to speak to your host, or use a path within those allowed.

antiekeradio 03-08-2007 04:11 PM

i think the 'allowed' path gets screwed up because i see virtually the same path thice, separated by a colon.

will have to talk about this with the host (or uninstall until we found a better one ;-) )

anyways, thanks for your time and i WILL reinstall this when i can get it working!!

Aclikyano 03-17-2007 08:14 PM

Database Backup

An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)

(when I selected run now)

djbaxter 03-17-2007 10:26 PM

Quote:

Originally Posted by Aclikyano (Post 1205826)
Database Backup

An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)

(when I selected run now)

Either

1. the path to your backup directory is incorrect; or

2. you forgot to write-enable the backup directory (7-7-7)

ascender 03-18-2007 12:11 PM

Fantastic product, thanks for developing it and sharing.

stejoh 03-18-2007 01:08 PM

Seems to work just great for me! Many thanks!

Have two questions about the config file:
What does the options below mean and what effects has the value 1 on these settings?

Quote:

// Backup Options
$backup['LOCK'] = 0; // Lock tables during dump
$backup['REPAIR'] = 0; // Repair & Optimize tables before dump
Quote:

// Combine Tables into one file
$backup['COMBINE'] = 0;

djbaxter 03-18-2007 02:22 PM

Quote:

Originally Posted by stejoh (Post 1206359)
Have two questions about the config file: What does the options below mean and what effects has the value 1 on these settings?
Quote:

// Backup Options
$backup['LOCK'] = 0; // Lock tables during dump
$backup['REPAIR'] = 0; // Repair & Optimize tables before dump
Quote:

// Combine Tables into one file
$backup['COMBINE'] = 0;

The first two are self-explanatory: LOCK prevents new data from being added to a tanle while it is being backed up and "REPAIR" checks for and fixes any errors before the backup.

The third combines all of the individual tables into a single SQL file if set to 1; if left at 0, you get separate files for each table in the database.

stejoh 03-18-2007 03:12 PM

Quote:

Originally Posted by djbaxter (Post 1206435)
The first two are self-explanatory: LOCK prevents new data from being added to a tanle while it is being backed up and "REPAIR" checks for and fixes any errors before the backup.

The third combines all of the individual tables into a single SQL file if set to 1; if left at 0, you get separate files for each table in the database.

Aha, I understand then!
* It feels "safest to have LOCK and REPAIR set to 1, but is it really so?
* Are there any disadvantages to backup into one single SQL file?

djbaxter 03-18-2007 03:20 PM

Quote:

Originally Posted by stejoh (Post 1206467)
Aha, I understand then!
* It feels "safest to have LOCK and REPAIR set to 1, but is it really so?

I believe it is safer, yes.

Quote:

Originally Posted by stejoh (Post 1206467)
* Are there any disadvantages to backup into one single SQL file?

If you are running your own MySQL queries that may have the possibility of messing up one of the tables, it's a good idea to do a backup first. If it's NOT a combined-file backup, it's easier to restore just that single table. Beyond that, it's normally easier to have the backup in one file for restore operations and for disk space reasons.

Paul M 03-18-2007 08:48 PM

Points to note;

If you lock the tables then your forum will not be usable during a backup.

On larger databases, a repair can take a long time to run.

kontrabass 03-23-2007 04:04 PM

Quote:

Originally Posted by Paul M (Post 1206837)
Points to note;

If you lock the tables then your forum will not be usable during a backup.

On larger databases, a repair can take a long time to run.


Question: I didn't know that *not* locking the tables during a mysqldump was even an option... In your opinion is it relatively safe, provided that my board is OFF, to not lock tables during a dump? If so then this will be better than MysqlHotCopy for me, which locks the whole shebang and results in dropped/timeout connections even when the board is turned off, during a live backup)...

eoc_Jason 03-23-2007 04:49 PM

Usually if your board is off / closed, the only inserts it will still try to make is for session stuff. Of course your staff needs to know that when the board is closed not to make posts or anything as that could lead to data inconsistencies.

kontrabass 03-23-2007 05:25 PM

Thanks, that makes sense.

Last question I promise :)

Is this method of backing up recommended on dual-server setups (www + db)? I guess all the backup .sql ends up on the www server..

Paul M 03-23-2007 10:58 PM

Quote:

Originally Posted by kontrabass (Post 1210510)
Is this method of backing up recommended on dual-server setups (www + db)? I guess all the backup .sql ends up on the www server..

It ends up wherever you point the backup path.

cajunboy2208 03-24-2007 09:13 AM

I don't think I am having problems. I am just totally confused. I installed it. I have it showing up on my Manage Products. I only changed one line in the mysqlbackupconfig.php, which was where I wanted my backups to go.

As to: Alter the timing of the cron job to suit.
I have no idea how to do that, or where to access it at.

Also I don't know how to access the profuct either, I don't see it anywhere on my ACP.
I would like to set it to where it backs up every day at a certain time, at like 4am if that is possible.

And one more thing... is this like the Database Backup, where it incudes every table and such?

EDIT: Ok, I didn't know it was under Scheduled Task Manager, I was looking in Scheduled Task Log.
I ran it, it ran good, but one thing, I don't want every single line of sql. I would like it to just be one file, just like on the Maintaince Database Backup. How do I go about that?

EDIT x2: Read up, and got my answer.
ONE LAST THING!
I ran the complete back up, and it came to be 12220k using the Task Manager backup.
When using the Maintaince Database Backup, it comes to be 12485k. Anything to be worried about here?

Paul M 03-24-2007 06:55 PM

Quote:

Originally Posted by cajunboy2208 (Post 1210943)
I ran the complete back up, and it came to be 12220k using the Task Manager backup.
When using the Maintaince Database Backup, it comes to be 12485k. Anything to be worried about here?

Nope, nothing to worry about.


All times are GMT. The time now is 03:09 AM.

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.05252 seconds
  • Memory Usage 1,874KB
  • 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
  • (37)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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