Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Reply
 
Thread Tools
MySQL Database Backup/Restore Hack Ver. 1.0 Details »»
MySQL Database Backup/Restore Hack Ver. 1.0
Version: 1.00, by Birdie501 Birdie501 is offline
Developer Last Online: Feb 2011 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-19-2002 Last Update: Never Installs: 57
Is in Beta Stage  
No support by the author.

################################################## ###############
MySQL Database Backup/Restore Hack Ver. 1.0
for all versions! tested with vb 2.2.5
Release Date: 20.04.2002
by Birdie501
Credits to: Jens Dutzi
################################################## ################

What this hack does:

You can backup and restore your mysql database via Admin CP!
Lot of people have problems to restore their database du to server timeouts!
With this hack you will never have any problems!
But anyhow you will use this hack with your own risk!

Requirements: Unix, GZIP, MySQL, MySQLDump

I am not a programmer! I just tried to implement this feature into my vbulletin and it works!
Maybe some of you, have the possibility to improve this hack! You are welcome!

Enjoy guys=))

Birdie501

just updated the instructions for the root path!
zip file updated!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 05-10-2002, 12:45 PM
ZiRu$'s Avatar
ZiRu$ ZiRu$ is offline
 
Join Date: Jan 2002
Location: Manitoba, Canada
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$pfad="d:/gearhost/hostingaccounts/lfgs/www/test/admin/backup";                           // root without / at the end
                    // If you don't know the root, just upload root.php on your server and call it!
$download_url="http://www.mysite.com/test/admin/backup/";                // [url]http://...[/url] with / at the end 
but thats not the real path........

this is
d:\gearhost\hostingaccounts\lfgs\www est\

see it has backslashes instead of forward slashes
Reply With Quote
  #73  
Old 05-11-2002, 05:20 PM
ZiRu$'s Avatar
ZiRu$ ZiRu$ is offline
 
Join Date: Jan 2002
Location: Manitoba, Canada
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

man please i need HELP!
Reply With Quote
  #74  
Old 05-11-2002, 05:51 PM
ZiRu$'s Avatar
ZiRu$ ZiRu$ is offline
 
Join Date: Jan 2002
Location: Manitoba, Canada
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's what i think is wrong
PHP Code:
// ###################### Start Dorestore #######################

if ($HTTP_POST_VARS['action']=="dorestore") {

if(
file_exists($pfad."/backup.sql.gz")==1):
  
$programm="mysql";
  
$parameter="--host=".$db_host." --user=".$db_username." --password=".$db_passwort." --database=".$db_name." <".$pfad."/backup.sql";

  echo(
"<b>decompress backup:</b> \n");
  
exec("cd ".$pfad$lines$result);
  
exec("gzip -d ".$pfad."/backup.sql.gz"$lines$result);
  echo(
"done!<br>\n");

  echo(
"<b>restore file to database:</b> \n");
  
exec($programm." ".$parameter$lines$result);
  echo(
"done!<br>\n");
else:
  echo(
"<b>File <font color='red'>".$pfad."/backup.sql.gz</font> not found!</b> \n");
endif;


I tought for my host i need to switch all the "/" to "\"
But it still don't work! I changed all the "/" to "\" before backup.sql

and that never worked.....So is there any chance you could Re-Write the Dorestorecode for me so that It dosen't Have and "/" and instead on this line

PHP Code:
$pfad="d:\gearhost\hostingaccounts\lfgs\www\test\admin\backup";                           // root without / at the end 
i can put the \ at the end

Thanks in Advance...
Reply With Quote
  #75  
Old 05-11-2002, 06:23 PM
ZiRu$'s Avatar
ZiRu$ ZiRu$ is offline
 
Join Date: Jan 2002
Location: Manitoba, Canada
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now it says:

decompress backup: done!
restore file to database: done!

but it never actually did it.....and it wont backup either......it says its fine but it's actually not....it dont create a file
Reply With Quote
  #76  
Old 05-12-2002, 01:46 PM
Birdie501's Avatar
Birdie501 Birdie501 is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey sorry i dont know how to solve your problem! You should ask your hoster because i think there is the problem!
Reply With Quote
  #77  
Old 05-23-2002, 10:38 PM
machiavelli33 machiavelli33 is offline
 
Join Date: Feb 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by skyline2002

in some server ,The path to the 'mysqldump' command on the will be: /usr/local/mysql/bin/mysqldump

By the way,thx Birdie501 , Great hack!!!!
enjoy!!!
hey Skyline...can you explain this part again?

How do you change the mysqldump to another command? Is that something the site server can do or can it be modified in the hack?
Reply With Quote
  #78  
Old 05-24-2002, 03:45 AM
skyline2002 skyline2002 is offline
 
Join Date: Dec 2001
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by machiavelli33


hey Skyline...can you explain this part again?

How do you change the mysqldump to another command? Is that something the site server can do or can it be modified in the hack?
you dont have the permission to turnon or off the mysqldump function if you rant the webspace by a hoster.

you may ask your hoster for the dir of the command.

i just changed the dir. the command still is mysqldump!
Reply With Quote
  #79  
Old 05-24-2002, 10:57 PM
Finan Finan is offline
 
Join Date: Mar 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've had this work under 224 and 225... Only problems where my own typos Great hack
Reply With Quote
  #80  
Old 06-09-2002, 02:41 PM
freakyshiat freakyshiat is offline
 
Join Date: Nov 2001
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my mysql database is on a different server. will this hack work with it?
Reply With Quote
  #81  
Old 06-13-2002, 07:17 PM
nitro nitro is offline
 
Join Date: Nov 2001
Posts: 302
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm i suggested this @ vbulletin.com forum ages ago

they categorically stated it will make no difference php will still time out

and the restore will be incomplete and php backup is not 100% reliable

so i learnt telnet

its not difficult unless of course yer host dont have telnet but a host with mysql an no telnet imo is like a bacon butty with no bacon

of course i hope the hack works ok 4 u all iv downloaded it incase i ever need it i certainly dont have the knowledge to write it myself
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:24 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06282 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete