vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   MySQL Database Backup/Restore Hack Ver. 1.0 (https://vborg.vbsupport.ru/showthread.php?t=37655)

Psychdrone 04-24-2002 08:27 PM

all man so I am screwed???

Austin Dea 04-24-2002 10:49 PM

Quote:

Originally posted by Cell Block
Let me get this right, with this hack i can restore my database if it had messed up, or if i've moved to a new server i can install the board and hack and then restore the board this way rather than using telnet or SSH?

I don't know but i may have mis-understood

This hack can make a backup of your database for you to download, or you can restore your database from a backup you downloaded previously.

ZiRu$ 04-24-2002 11:24 PM

I get the regular:

------------------------
Start MySQL Dump: done!
compress file: done!
delete not compressed file: done!
Before you can restore this file, you have to rename to backp.sql.gz:

Download File
------------------------

But My admin/backup.php is empty...and when i click the download file it has

/admin/backup1019693643.sql.gz

its supposed to be
/admin/backup/backup1019693643.sql.gz


---------------------------------
Here's My Variables:
PHP Code:

$pfad="/public_html/test/admin/backup";
$download_url="http://www.hotdoggssite.com/admin/backup"

Can I get some help?

Psychdrone 04-25-2002 02:03 AM

Whats wrong with me:(

Birdie501 04-25-2002 09:13 AM

Quote:

Originally posted by Hot Dogg
I get the regular:

------------------------
Start MySQL Dump: done!
compress file: done!
delete not compressed file: done!
Before you can restore this file, you have to rename to backp.sql.gz:

Download File
------------------------

But My admin/backup.php is empty...and when i click the download file it has

/admin/backup1019693643.sql.gz

its supposed to be
/admin/backup/backup1019693643.sql.gz


---------------------------------
Here's My Variables:
PHP Code:

$pfad="/public_html/test/admin/backup";
$download_url="http://www.hotdoggssite.com/admin/backup"

Can I get some help?

Hi,

you forgot to add a slash " / " at the end of the download url!

use this:

PHP Code:

$pfad="/public_html/test/admin/backup";
$download_url="http://www.hotdoggssite.com/admin/backup/"


ZiRu$ 04-25-2002 01:36 PM

Quote:

Originally posted by Birdie501


Hi,

you forgot to add a slash " / " at the end of the download url!

use this:

PHP Code:

$pfad="/public_html/test/admin/backup";
$download_url="http://www.hotdoggssite.com/admin/backup/"


ok i did do that but it still dont work! It dosent create a file?

what else can i do?

Birdie501 04-25-2002 01:39 PM

Then please contact your hoster and ask if he provide mysql dumps etc. like discussed above!

Dark_Wizard 04-25-2002 02:45 PM

Quote:

Originally posted by Hot Dogg


ok i did do that but it still dont work! It dosent create a file?

what else can i do?

Hostrocket does support the MySQL commands and gzip....get in touch with me via ICQ and I will help you out. BTW I just tested this and I'm on hostrocket and it works fine...nice hack!

Birdie501 04-25-2002 02:48 PM

Hi Dark_wizard,

would be nice if you can publish your solution here in this thread so that also other user can use the hack :-)

Thanks.
:cheeky:

Austin Dea 04-25-2002 10:55 PM

Quote:

Originally posted by Hot Dogg


ok i did do that but it still dont work! It dosent create a file?

what else can i do?

That doesn't look like your whole root directory. Upload root.php and see what it calls up.

ZiRu$ 04-26-2002 12:19 AM

Quote:

Originally posted by Austin Dea


That doesn't look like your whole root directory. Upload root.php and see what it calls up.

thanks thats what the problem was! It's NOW FIXED :)

But I'm having 1 more problem.....

When i go to ftp client and look at the "backup" file! The download is only 958k and has a file called "error.txt" with no content!

What's up wit dis?

Birdie501 04-26-2002 05:16 AM

If the error.txt is empty dont care about it!
Do you wonder why your file is that small? Be happy :-)
If you use the restore function the file will be uncompressed! Then you can see how big it normally would be without compressing.

skyline2002 04-26-2002 12:14 PM

Quote:

Originally posted by Dark_Wizard


Hostrocket does support the MySQL commands and gzip....get in touch with me via ICQ and I will help you out. BTW I just tested this and I'm on hostrocket and it works fine...nice hack!

Dark_Wizard

please publish your solution here . help us!!

by the way , i couldnt find your icq # in anywhere!!

thanks in advance!!!

ZiRu$ 04-26-2002 03:26 PM

Quote:

Originally posted by skyline2002


Dark_Wizard

please publish your solution here . help us!!

by the way , i couldnt find your icq # in anywhere!!

thanks in advance!!!

the problem is you dont have the full path in

run root.php and everything will work perfectly

Psychdrone 04-26-2002 07:21 PM

so I am screwed??

Help:(

212rikanmofo 04-26-2002 07:26 PM

doesn't vb 2.2.5 already have an option to backup database under the admin cp? i thought i saw it?

212rikanmofo 04-26-2002 07:46 PM

i'm not sure if this is spose to work with windows, but i get the following:

Start MySQL Dump:
Warning: Unable to fork [mysqldump -l --add-drop-table -h localhost -uadmin -pgeddy vbulletin 2>h:/apache/htdocs/forum/admin/backup/error.txt >h:/apache/htdocs/forum/admin/backup/1019853638.sql] in h:\apache\htdocs\forum\admin\template.php on line 753
done!
compress file:
Warning: Unable to fork [gzip -c h:/apache/htdocs/forum/admin/backup/1019853638.sql > h:/apache/htdocs/forum/admin/backup/1019853638.sql.gz] in h:\apache\htdocs\forum\admin\template.php on line 757
done!
delete not compressed file:
Warning: Unable to fork [rm h:/apache/htdocs/forum/admin/backup/1019853638.sql] in h:\apache\htdocs\forum\admin\template.php on line 761
done!
Before you can restore this file, you have to rename to backp.sql.gz:
Download File

ZiRu$ 04-27-2002 06:12 AM

Quote:

Originally posted by 212rikanmofo
doesn't vb 2.2.5 already have an option to backup database under the admin cp? i thought i saw it?
Dont use that cause if you back it up you need to import it through telnet!

I just got it working PERFECTLY....I backed up my database and imported it WITH no problems.....Picture Perfect.

You have made my day. This should come out of beta testing since it works. If it dosent its your host or your screw up

Birdie501 04-27-2002 07:03 AM

@psychdrone

if you installed the way you have to and it doesn't work there is something wrong with your hoster. Maybe you have the same hoster like Hot Dogg but another package where the mysql dumps for example is not includede or something else! You have to talk to them!

@Hot Dogg
Well maybe i will make it out of beta but probably i will release some new features, so be patient. :-)

skyline2002 04-27-2002 08:14 AM

Quote:

Originally posted by Hot Dogg


the problem is you dont have the full path in

run root.php and everything will work perfectly

i dont think so it is the full path problem.
i didnt get any error message and i can see *.sql in my backup folder. but sql file is 0kb. and got a error.txt says:
"mysqldump command not find!!!"

sad!!!!

Birdie501 04-27-2002 08:28 AM

Quote:

Originally posted by skyline2002

and got a error.txt says:
"mysqldump command not find!!!"

sad!!!!

Did you contact your hoster? That is a server not a script problem!
I think he doesn't support mysql dumps!!!!

skyline2002 04-27-2002 01:29 PM

yes i did Birdie501.

here is what did they reply to me:
----------------------------------------------------
Hello,
>
> Your site is being hosted on a UNIX/Linux server. Please provide us with
the location of the file displayed below so that we can further assist you.
>
> Thank you for choosing SiteTurn Networks!
-------------------------------------------------------------------

i dont understand what they want me to do.
poor english! i need to work harder on my english!!

Birdie501 04-27-2002 06:04 PM

Tell them where the file template.php is (in which folder)

or send the code of the backup part! They will know how to help you!

skyline2002 04-28-2002 11:06 AM

thanks man

skyline2002 04-29-2002 11:36 PM

ok, guys. i got the answer from my hoster. hope it can help some people here.

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!!!

Ren 04-30-2002 12:41 AM

Awesome Job :) Installed and working flawless ... Thanks a million

ZiRu$ 05-09-2002 08:11 PM

i switched to gearhost and now i get this

File d:\gearhost\hostingaccounts\lfgs\www est\admin\backup/backup.sql.gz not found!

what should i do? cause the \ and / are mixed

ZiRu$ 05-09-2002 08:18 PM

and yes i tried

/gearhost/hostingaccounts/lfgs/www/admin/backup

and it said it was restored......but it actually isn't!

And I tried backing up the database and it had a 0 byte file

ZiRu$ 05-10-2002 03:24 AM

please someone gotta help me! I need to get my site back up

Birdie501 05-10-2002 09:02 AM

show me your part of the code with the download url ...

ZiRu$ 05-10-2002 12:45 PM

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

ZiRu$ 05-11-2002 05:20 PM

man please i need HELP!

ZiRu$ 05-11-2002 05:51 PM

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...

ZiRu$ 05-11-2002 06:23 PM

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

Birdie501 05-12-2002 01:46 PM

Hey sorry i dont know how to solve your problem! You should ask your hoster because i think there is the problem!

machiavelli33 05-23-2002 10:38 PM

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?

skyline2002 05-24-2002 03:45 AM

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!

Finan 05-24-2002 10:57 PM

I've had this work under 224 and 225... Only problems where my own typos :o Great hack :)

freakyshiat 06-09-2002 02:41 PM

my mysql database is on a different server. will this hack work with it?

nitro 06-13-2002 07:17 PM

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


All times are GMT. The time now is 06:03 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.01363 seconds
  • Memory Usage 1,846KB
  • 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
  • (7)bbcode_php_printable
  • (13)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