vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Vbulletin Database Backup Pro (Cron Support) (https://vborg.vbsupport.ru/showthread.php?t=78486)

RichieBoy67 04-05-2005 11:03 AM

Thanks for this :) Great Job!!

Lizard King 04-05-2005 12:05 PM

When I am trying to run this i get an error Failover was initiated for MySQLDump Binary & An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.
Can you explain me what i am doing wrong ?

cybermomcafe 04-05-2005 12:44 PM

Did you chmod the folder that the backup is being written into to 777?

Are you using an absolute path to the backup folder (i.e. /home/user/public_html/backup/) or wherever it is?

Also, if you are running it again on the same date, make sure that there is not a file in the backup folder with that date already... :) hth

Trigunflame 04-05-2005 02:05 PM

Quote:

Originally Posted by cybermomcafe
Did you chmod the folder that the backup is being written into to 777?

Are you using an absolute path to the backup folder (i.e. /home/user/public_html/backup/) or wherever it is?

Also, if you are running it again on the same date, make sure that there is not a file in the backup folder with that date already... :) hth

The script auto removes a file of the same name before the backup process.

-------

But yes, cyber is right, make sure you are chmodding the directory you are wanting to save the dump to, 777.

Also make sure the path is valid. Either use a full path, or a path relative to the main forum directory.

For example I use:

$backup['DUMP_PATH'] = 'admincp/backups';

Which saves the dump to the backups folder inside my admincp folder.

mharmon 04-05-2005 02:15 PM

When I ran the database backup via cron -- it worked perfectly -- but it did not compress the FILE -- and it left my forums closed with the default "backing up the database" message.

Any suggestions?

Trigunflame 04-05-2005 02:34 PM

Quote:

Originally Posted by mharmon
When I ran the database backup via cron -- it worked perfectly -- but it did not compress the FILE -- and it left my forums closed with the default "backing up the database" message.

Any suggestions?

Run the cron manually, and make sure you don't get any error messages.

------

What compression settings are you using, Mysqldump or PHPdump etc..

mharmon 04-05-2005 02:57 PM

I ran the cron manually -- and it works perfectly. I didn't get any error messages on the screen.

These are the compression settings from the config file:

$backup['COMPRESS'] = 1;
$backup['BUFFER'] = 1048576;
$backup['COMPRESSION']= 'gz';
$backup['COMPRESSORS']= array(
'gzip' => 'gzip',
'bzip2' => 'bzip2',
'tar' => 'tar',
'zip' => 'zip'
);

Trigunflame 04-05-2005 03:10 PM

Quote:

Originally Posted by mharmon
I ran the cron manually -- and it works perfectly. I didn't get any error messages on the screen.

These are the compression settings from the config file:

$backup['COMPRESS'] = 1;
$backup['BUFFER'] = 1048576;
$backup['COMPRESSION']= 'gz';
$backup['COMPRESSORS']= array(
'gzip' => 'gzip',
'bzip2' => 'bzip2',
'tar' => 'tar',
'zip' => 'zip'
);

$backup['COMPRESSION']= 'gz';

to zip, or tgz..

As for the script not setting your forum back up.. that really doesnt make sense, unless for some reason something is causing premature termination of the script, sometimes calls to functions that don't exist will do that..

What php, mysql version are you using?

mharmon 04-05-2005 03:24 PM

Mysql = 4.0.22

Php = 4.3.10

Lizard King 04-05-2005 04:17 PM

I figured out what i was doing wrong :) Thanks great script.

Trigunflame 04-05-2005 10:44 PM

Quote:

Originally Posted by Lizard King
I figured out what i was doing wrong :) Thanks great script.

Glad to hear.

EvilHawk 04-06-2005 01:11 PM

Installed, works fine for 2 weeks now, i have forgot to say thanks for this great script! ;)

Trigunflame 04-07-2005 02:09 AM

Welcome, still a bit more to add though. Will try to get it done over the week.

NxTek 04-07-2005 06:36 PM

We want to set up a second copy of vB for development, writing and testing new mods, etc. Per the license, we can set it up in a directory called vbtest and not make it public (password protect it). We're looking for a script that can syncronize the database, templates, etc from the production copy to the development copy.

If we back up the production copy of using VBulletin Database Backup Pro, can we restore it to the development copy?

Trigunflame 04-07-2005 11:17 PM

yes, just make sure to look over all the configuration options, and configure accordingly, make any changes needed.

neocorteqz 04-08-2005 04:52 AM

Quote:

Originally Posted by Trigunflame
Try using

tar xzvf MM_DD_YY.tar.gz it worked fine me in test, if not just change it to use straight .gz encoding.

then just use

gunzip MM_DD_YY.gz



-------------

As for it showing up in your log at multiple times, I can not yet explain that... it has not occured for me on any of the forums I have tried this on, make sure you dont have multiple cron entries for the backup either.

As for the CHMOD problem, I will add into the script to CHMOD the file after it is saved, that should fix the problem hopefully...

I just figured it was because of the Owner of the file, I should have exclusive access to ALL files in my hoting account, But it seems with that owner id (99 for me), It just doesn't wanna extract.
I did use the xzvf and it did uncompress it, but to a separate folder due to the path I used in the config. So it's extracting, but making a new folder.

No problem though, I can always use gzip compression like you suggested.

And Gzip -d works as well to uncompress. :)

NxTek 04-08-2005 04:39 PM

Quote:

Originally Posted by Trigunflame
yes, just make sure to look over all the configuration options, and configure accordingly, make any changes needed.

Before restoring to the testvb version?

Remi 04-08-2005 04:56 PM

Great hack, thanks :smoke:

can't wait for the "Restore" addon.

:up:

greenhybrid 04-08-2005 08:18 PM

Can anyone tell me about how long the forum would be down if the option to temporarily suspend is on? My database is currently at about 30MB

Trigunflame 04-08-2005 08:51 PM

If you have shutdown option configured, it would shutdown before backup, and reopen immediately afterward.

30mb is a very small database, I would say total backup time, 5-20sec

neocorteqz 04-09-2005 01:44 AM

Quote:

Originally Posted by Trigunflame
If you have shutdown option configured, it would shutdown before backup, and reopen immediately afterward.

30mb is a very small database, I would say total backup time, 5-20sec

That's about right, But then again I saw mine compress within say 20 seconds for a 130 Meg DB.. I could have timed it wrong though. :D :)

Trigunflame 04-09-2005 09:44 AM

Quote:

Originally Posted by neocorteqz
That's about right, But then again I saw mine compress within say 20 seconds for a 130 Meg DB.. I could have timed it wrong though. :D :)

Even better :)

XrayHead 04-09-2005 10:37 AM

Top Hack, Installed with no probs at all.

One question though, Can I rename or change one of the phps so that I can also run a backup once a week and ftp my database? I have the cron set to run at midnight at present and dont want to FTP everynight.

Thanks

XraY

Trigunflame 04-10-2005 12:34 AM

Quote:

Originally Posted by XrayHead
Top Hack, Installed with no probs at all.

One question though, Can I rename or change one of the phps so that I can also run a backup once a week and ftp my database? I have the cron set to run at midnight at present and dont want to FTP everynight.

Thanks

XraY

If I were just you, I would turn FTP off, and wait till I create the AdminCP based control panel that will allow various things to be done individually by the administrator regarding the backup script.

Other then that, just change your cron to backup once a week.. OR 1 more thing you could do.

-------------------

create a copy of cronbackup so that you have:

cronbackup.php
cronbackup2.php

create a copy of mysqlbackupconfig so that you have

mysqlbackupconfig.php
mysqlbackupconfig2.php

change cronbackup2.php to include mysqlbackupconfig2.php instead of mysqlbackupconfig.php

change mysqlbackupconfig.php, and turn FTP off
make sure mysqlbackupconfig2.php has FTP on

add the crontask as such:

cronbackup.php is daily, it will not use ftp
cronbackup2.php is weekly, it will use ftp

-------------------

Hope I didnt make that all to be too complicated

Remi 04-10-2005 03:01 AM

Hi

Is there a way to encrypt the backup files so I can store my files safely on public servers knowing that no one can read them but me.

Or I could make a deal with someone to send me his backups and I send him min!

Thanks

Trigunflame 04-10-2005 05:21 AM

Quote:

Originally Posted by Remi
Hi

Is there a way to encrypt the backup files so I can store my files safely on public servers knowing that no one can read them but me.

Or I could make a deal with someone to send me his backups and I send him min!

Thanks

Well this is not really a great idea, do to the problems with PHP and big files and the way block encyptions work.

1. I "Could" code in shell support for using ZIP's encryption, tar/gz and I believe bz also do not support encryption.

2. Use MCRYPT to encrpyt a backup archive into a solid mass of encryption, then it would be up to you to Decrypt using another PHP script or I could create one.

3. BEST Option. Set your backup directory to something, below your public_html directory, that way it can not be accessed via url by traditional means.

o0stephane0o 04-10-2005 09:46 PM

I have aproblem that I cannot solve..
I put the rights passwords and login name etc but it gives me the following message...

Invalid SQL: LOCK TABLES `access` READ, `adminhelp` READ, `administrator` READ, `adminlog` READ, `adminutil` READ, `announcement` READ, `attachment` READ, `attachmenttype` READ, `attachmentviews` READ, `avatar` READ, `bbcode` READ, `calendar` READ, `calendarcustomfield` READ, `calendarmoderator` READ, `calendarpermission` READ, `cpsession` READ, `cron` READ, `cronlog` READ, `customavatar` READ, `customprofilepic` READ, `datastore` READ, `deletionlog` READ, `editlog` READ, `event` READ, `faq` READ, `forum` READ, `forumpermission` READ, `gamechallenges` READ, `gamenews` READ, `games` READ, `gamesessions` READ, `holiday` READ, `icon` READ, `imagecategory` READ, `imagecategorypermission` READ, `language` READ, `mailqueue` READ, `moderation` READ, `moderator` READ, `moderatorlog` READ, `passwordhistory` READ, `phrase` READ, `phrasetype` READ, `pm` READ, `pmreceipt` READ, `pmtext` READ, `poll` READ, `pollvote` READ, `post` READ, `post_parsed` READ, `posthash` READ, `postindex` READ, `profilefield` READ, `ranks` READ, `regimage` READ, `reminder` READ, `reputation` READ, `reputationlevel` READ, `search` READ, `session` READ, `setting` READ, `settinggroup` READ, `smilie` READ, `stats` READ, `strikes` READ, `style` READ, `subscribeevent` READ, `subscribeforum` READ, `subscribethread` READ, `subscription` READ, `subscriptionlog` READ, `template` READ, `thread` READ, `threadrate` READ, `threadviews` READ, `upgradelog` READ, `user` READ, `useractivation` READ, `userban` READ, `userfield` READ, `usergroup` READ, `usergroupleader` READ, `usergrouprequest` READ, `usernote` READ, `userpromotion` READ, `usertextfield` READ, `usertitle` READ, `word` READ;
mysql error: Access denied for user: 'o0oo0X@localhost' to database 'o0oo0X'

How can i solve it?

Trigunflame 04-11-2005 12:17 AM

Quote:

Originally Posted by o0stephane0o
I have aproblem that I cannot solve..
I put the rights passwords and login name etc but it gives me the following message...

Invalid SQL: LOCK TABLES `access` READ, `adminhelp` READ, `administrator` READ, `adminlog` READ, `adminutil` READ, `announcement` READ, `attachment` READ, `attachmenttype` READ, `attachmentviews` READ, `avatar` READ, `bbcode` READ, `calendar` READ, `calendarcustomfield` READ, `calendarmoderator` READ, `calendarpermission` READ, `cpsession` READ, `cron` READ, `cronlog` READ, `customavatar` READ, `customprofilepic` READ, `datastore` READ, `deletionlog` READ, `editlog` READ, `event` READ, `faq` READ, `forum` READ, `forumpermission` READ, `gamechallenges` READ, `gamenews` READ, `games` READ, `gamesessions` READ, `holiday` READ, `icon` READ, `imagecategory` READ, `imagecategorypermission` READ, `language` READ, `mailqueue` READ, `moderation` READ, `moderator` READ, `moderatorlog` READ, `passwordhistory` READ, `phrase` READ, `phrasetype` READ, `pm` READ, `pmreceipt` READ, `pmtext` READ, `poll` READ, `pollvote` READ, `post` READ, `post_parsed` READ, `posthash` READ, `postindex` READ, `profilefield` READ, `ranks` READ, `regimage` READ, `reminder` READ, `reputation` READ, `reputationlevel` READ, `search` READ, `session` READ, `setting` READ, `settinggroup` READ, `smilie` READ, `stats` READ, `strikes` READ, `style` READ, `subscribeevent` READ, `subscribeforum` READ, `subscribethread` READ, `subscription` READ, `subscriptionlog` READ, `template` READ, `thread` READ, `threadrate` READ, `threadviews` READ, `upgradelog` READ, `user` READ, `useractivation` READ, `userban` READ, `userfield` READ, `usergroup` READ, `usergroupleader` READ, `usergrouprequest` READ, `usernote` READ, `userpromotion` READ, `usertextfield` READ, `usertitle` READ, `word` READ;
mysql error: Access denied for user: 'o0oo0X@localhost' to database 'o0oo0X'

How can i solve it?

Set

$backup['LOCK'] = 0;
$backup['LOCKTABLES'] = 0;

You most likely dont have the necessary permissions.

Also, make sure to read the configuration, there are lots of options to chose, and I have them explained; in detail.

o0stephane0o 04-12-2005 09:24 AM

Thanks 4 answering, I guess I wont backup the locked tables if I set them to 0 right?
So my backup won´t be complete..
Tell me if Iám wrong.

greenhybrid 04-13-2005 01:25 AM

Is there any way to have it backup other databases as well?

caislander 04-13-2005 03:55 AM

This is a great hack, since it save my poor weary brain from forgetting to do backups on time but I am having a slight problem, each time it runs the backup, it turns the board off but it never turss it back on. So if II am not around when the bacckup runs the boards are shutdown till I check and turn them back on.. Any thoughts?

Thanks

Trigunflame 04-13-2005 05:36 AM

Quote:

Originally Posted by caislander
This is a great hack, since it save my poor weary brain from forgetting to do backups on time but I am having a slight problem, each time it runs the backup, it turns the board off but it never turss it back on. So if II am not around when the bacckup runs the boards are shutdown till I check and turn them back on.. Any thoughts?

Thanks

Make sure cron logging is turned On for the backup. Check if you are getting any errors.

caislander 04-13-2005 11:06 PM

Quote:

Originally Posted by Trigunflame
Make sure cron logging is turned On for the backup. Check if you are getting any errors.

Trigunflame,

I have the error reporting option turned on, althought i don't see that it is creating any error files, I also have the scheduled task log reporting option set but I don't see that it is even creating a log entry :confused:

WhSox21 04-15-2005 04:55 AM

I wrote something similiar to this without the amount of features. I can tell you are definately a programmer. I've never seen such a well documented clean written hack here yet. Other programmers and hack developers should follow your programming ways, including myself!

Great hack, documentation and beyond!

Trigunflame 04-15-2005 06:35 AM

Quote:

Originally Posted by WhSox21
I wrote something similiar to this without the amount of features. I can tell you are definately a programmer. I've never seen such a well documented clean written hack here yet. Other programmers and hack developers should follow your programming ways, including myself!

Great hack, documentation and beyond!

Thanks, but it's actually not finished, lol..

For the last week, since I've recently purchased Zend Studio; I am completely writing the script phpDoc compatible. When that is finished, I will also upload the Zip file of it, which will completely document the class/function usage of the script in HTML format.

Trigunflame 04-15-2005 06:36 AM

Quote:

Originally Posted by caislander
Trigunflame,

I have the error reporting option turned on, althought i don't see that it is creating any error files, I also have the scheduled task log reporting option set but I don't see that it is even creating a log entry :confused:

Contact me on AIM/MSN or my email, and I will try to help you.

Lionel 04-15-2005 09:35 AM

I get this when I tried to do it manually

Quote:

Warning: Invalid argument supplied for foreach() in /includes/mysqlbackup.php on line 1378
MySQL Backup was completed successfully with no errors.

Trigunflame 04-15-2005 10:10 AM

Quote:

Originally Posted by Lionel
I get this when I tried to do it manually

That line would be from
PHP Code:

foreach ($tables AS $table

That means you have set 2 things wrong in the configuration.

1. You should be doing a full table dump.
2. If you are doing a selective table dump, you have to fill the array of tables to be dumped.

Judging by that error you are getting.

You are doing a selective table dump, and you havnt filled the table array.

Please Read The Configuration, before asking questions here.

Lionel 04-15-2005 10:51 AM

Note: If your using option 1 to dump all tables it will
ignore the TABLES array anyway.


NOte: If you are using prefixes, you must specify them
yourself in the tables array ie. forum_post, forum_user.
-----------------------------------------------------------
Combine Tables For Selective Dump
-----------------------------------------------------------
If you have selected option 0 to dump specific tables. This
option determines whether or not the dumps are Re-Combined
into 1 File for the purpose of keeping a cleaner dump
folder and ease of use, without having to re-import
multiple files again.

NOTE:
If you set COMBINE to 0 you MUST use the compression
handler (tar, tgz, tbz, zip) INSTEAD of (gz, bz2) as
they alone do not support multiple files in 1 compressed
archive.

For that reason, if you are not going to use the combine
option, use one of the tar variations or zip.
-----------------------------------------------------------
0 = Individual Tables SQL files are archived together.
1 = All Tables are re-joined back into 1 SQL File.
-----------------------------------------------------------
*/

$backup['TYPE'] = 1;
$backup['TABLES'] = array('post','user');
$backup['COMBINE'] = 1;

Trigunflame 04-15-2005 11:01 AM

Quote:

Originally Posted by Lionel
Reply...

Will contact you shortly.

Update:

Contact with Lionel, problem solved.


All times are GMT. The time now is 08:59 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.01607 seconds
  • Memory Usage 1,854KB
  • 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_php_printable
  • (18)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