Log in

View Full Version : MySQL Database Backup/Restore Hack Ver. 1.0


Birdie501
04-19-2002, 10:00 PM
################################################## ###############
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 :cool:

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

Birdie501
04-20-2002, 01:17 PM
This is how it looks like!

Birdie501
04-20-2002, 01:17 PM
Screen 2:

Birdie501
04-20-2002, 01:21 PM
Screen 3

Birdie501
04-20-2002, 01:22 PM
and screen 4

EchoHype.com
04-20-2002, 02:42 PM
Thanks man!

I needed something like this, and now I have it =)

Austin Dea
04-20-2002, 04:29 PM
Wow, what an awesome idea :D.

Austin Dea
04-20-2002, 04:59 PM
$download_url="http://"; // http://... with / at the end

what url do we put there?

Question:Why are the edits in template.php? Shouldn't they be in backup.php or something o_O?

Birdie501
04-20-2002, 05:50 PM
Originally posted by Austin Dea


what url do we put there?

Question:Why are the edits in template.php? Shouldn't they be in backup.php or something o_O?

Hi Austin Dea,

you should put the url where your backup folder is!

example: http://www.test.de/forums/admin/backup/


Well you are right, first i had an backp.php, but i think it is better in template.php because it is easier to install and the design fits better to the admin cp!

But the most important thing is: It works :classic: :D

Austin Dea
04-20-2002, 05:57 PM
I get a 404 File not found when i click download file:'(...

Birdie501
04-20-2002, 06:04 PM
when you put the mouse over the link, what url do you see?

Austin Dea
04-20-2002, 06:05 PM
<a href="http://www.razael-central.com/forums/admin/backup/1019329010.sql.gz" target="_blank">http://www.razael-central.com/forums...9329010.sql.gz</a>

Birdie501
04-20-2002, 06:10 PM
in variable declaration , did you forget to put a / at the end in download url?

Birdie501
04-20-2002, 06:15 PM
If you have a look to you forum via ftp, where is the sql.gz file saved to?

in admin folder?

Austin Dea
04-20-2002, 06:16 PM
It's not saved anywhere I don't think...

Yeah I don't see it anywhere...like it's not even saving..

Birdie501
04-20-2002, 06:20 PM
please try to put the exact url to the root path:

root/forums/admin/backup

Austin Dea
04-20-2002, 06:22 PM
o_O

Is what I have not right?

Edit: K, me and Birdie501 worked it out over pm's. Great hack!

Alfo
04-20-2002, 09:23 PM
great hack

when doing the restore i had a problem but the name you specified to rename the db was wrong it should be backup.sql.gz
not backp.sql.gz

Great hack though

SoliduS_cF
04-20-2002, 11:38 PM
When i click on the do backup, it progress's to the next screen as normal, but when i goto rename the file to backp.sql.gz there is no such file on the server, i have followed the included instructions, share any light on this buddy ?

techno
04-21-2002, 12:23 AM
Simply Sweet!!

Austin Dea
04-21-2002, 05:19 AM
Originally posted by SoliduS_cF
When i click on the do backup, it progress's to the next screen as normal, but when i goto rename the file to backp.sql.gz there is no such file on the server, i have followed the included instructions, share any light on this buddy ?

I had this problem.

Be sure your pfad variable is

your root(as called by root.php)/forums/admin/backup

So you have to have the root deal, plus the path to the backup directory (without the slash at the end)

then your
download_url=www.yourdomain.com/forums/admin/backup/


Also, you don't have to rename it when you back it up (unless your changing it to the date (what i do)). You only need to make it backup.sql.gz when you are restoring from a backup =P.

Birdie501
04-21-2002, 01:12 PM
Hey Austin Dea,

thanks for the support :-)))

Psychdrone
04-21-2002, 09:11 PM
ok what am I doing wrong??? (this is a grate hack by the way, if I can get it to work!!!!)

I cencered my sites url, by replacing it with Mysite for privacy

OK heres what I got, when I click on the download button I get thi

http://www.mysite.com/forum/admin/backup/1019426678.sql.gz
and its a blank page:(


heres what I put in for my root path
home/myusername/public_html/forum/admin/backup

and heres what I put in for the download link
http://www.mysite.net/forum/admin/backup/

What am I doing wrong, please help!!

Austin Dea
04-21-2002, 09:56 PM
Is home/myusername/public_html/ what the root.php calls?

212rikanmofo
04-21-2002, 11:40 PM
you said this hack on works on unix? so i guess it wont work under windows?

Birdie501
04-22-2002, 06:51 AM
Originally posted by 212rikanmofo
you said this hack on works on unix? so i guess it wont work under windows?

Hi,
well my hoster has a unix server so i am not sure if it works with windows. Maybe someone should try and confirm.

Birdie501
04-22-2002, 02:59 PM
mmmhh,

i just wondering that the zip file has been downloaded for (up to now) 45 times! Where are these guys! Would like to hear if there are bugs....

Thanks!

Psychdrone
04-22-2002, 05:42 PM
Heres what it says
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ // $$ call this file to see your root path $$ // $$ Birdie501 $$ // $$ contact via PM on vbulletin.org $$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ /home/mysitesname/public_html

Please help me, and tell me what to fill in

Birdie501
04-22-2002, 06:13 PM
Originally posted by Psychdrone
Heres what it says
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ // $$ call this file to see your root path $$ // $$ Birdie501 $$ // $$ contact via PM on vbulletin.org $$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ /home/mysitesname/public_html

Please help me, and tell me what to fill in

Here we go :-)

In the line of the root path, just fill in the root path plus the folders to your backup folder. In your example.

home/mysitesname/public_html/forums/admin/backup

your download url must be:

http://www.yoursite.com/forums/admin/backup/

thats all!

Austin Dea
04-23-2002, 02:32 AM
Except it should be

"/home/mysitesname/public_html/forum/admin/backup"

and

"http://www.yoursite.com/forum/admin/backup/"

You forgot the first slash, and he has just forum for his directory, not forums.

:D

Birdie501
04-23-2002, 06:10 AM
Originally posted by Austin Dea
Except it should be

"/home/mysitesname/public_html/forum/admin/backup"

and

"http://www.yoursite.com/forum/admin/backup/"

You forgot the first slash, and he has just forum for his directory, not forums.

:D

you're right! Keep watching! :-)

It should be better if i don't spend too much time in fron of the computer :D

skyline2002
04-23-2002, 06:40 PM
Originally posted by Birdie501
################################################## ###############
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 :cool:

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

it is a nice hack, man!!
but i got a error message when i try to backup my forum database!

here is the message:
-----------------------------------
sh: mysqldump: command not found.
-----------------------------------

so what can i do with it ??

hope you can fix the problem. my web hoster is from www.Siteturn.com!!!
thank you so much!!!

Psychdrone
04-23-2002, 07:17 PM
Damn I new this [better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth] was too good to be true!!

I get an invalid arch file when I try to open the zip:(

ZiRu$
04-24-2002, 03:19 AM
I was lookin forward to this hack but i think i'll wait till everyone gets there problems solved

Austin Dea
04-24-2002, 04:34 AM
There are no problems for me...works fine :).

@skylinw2002-You might want to talk to your host bout that...

I don't know what Psychdrone's problem is, the zip is working fine for me.

skyline2002
04-24-2002, 05:13 AM
ok thx, man i just sent a email to my web hoster!!

proton242
04-24-2002, 06:44 AM
when i click on download i have this message:

# MySQL dump 8.16
#
# Host: localhost Database: mydatabase
#--------------------------------------------------------
# Server version 3.23.45

and my backup folder are empty...

Birdie501
04-24-2002, 08:42 AM
@skyline2002

Hi, i am sure that this is a problem with your host! Maybe he doesn't support mysql dumps!!!

@proton
so you try this with your local server, what server do you use?
Here is the part of my file:
Server version 3.23.47-Max-log

Maybe it doesn't work with your older version?

@HotDogg
Well this isn't really a problem! If your hoster support all the needed functions it will work fine! Just have a try, you cant destroy anything!

ZiRu$
04-24-2002, 02:29 PM
Originally posted by Birdie501

@HotDogg
Well this isn't really a problem! If your hoster support all the needed functions it will work fine! Just have a try, you cant destroy anything!

ok thanks! i will try it when i get home!!!

I will test it on 2.2.4

I am running on hostrocket as a server. Has anyone had any problems/or even tried this hack on hostrocket?

Does this eliminate if you were switching servers you wouldn't have to use telnet?

Cell Block
04-24-2002, 05:52 PM
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

Psychdrone
04-24-2002, 08:27 PM
all man so I am screwed???

Austin Dea
04-24-2002, 10:49 PM
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:

$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
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:

$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:


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

ZiRu$
04-25-2002, 01:36 PM
Originally posted by Birdie501


Hi,

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

use this:


$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
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
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
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
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
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
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
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
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
$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/"; // http://... 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

// ###################### 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


$pfad="d:\gearhost\hostingaccounts\lfgs\www\test\admin\ba ckup"; // 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
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
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

X-Fan
06-15-2002, 12:48 PM
Well it's not working for me, and I have my full root path and full URL path entered.

I get the messages...

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 the file does not exist. And yes, my backup directory is chmodded 777.

Any ideas?

Birdie501
06-15-2002, 01:22 PM
show me your variables!

X-Fan
06-16-2002, 05:32 AM
Done, but I still don't understand why it would tell me it's done the various steps of the backup, then give me a link to the backup file, if you say my host may not support one of the variables?

BigJohnson
06-18-2002, 11:43 AM
I get the

sh: mysqldump: command not found

Thing to in my error.txt file but the zip file is the correct file size but i never restored yet because i don't want to take the chance of screwing everything up. But i will restore when i need to but I am still lost in what i have to do to get this error out of the way or does it not matter?

BigJohnson
06-18-2002, 11:46 AM
Hold on a sec the zip file is 35 bytes but the sql file inside is 0 byties with nothing inside of it ++++. What shoul i do? And also what is wrong with the database back up that 2.2.5 has already? I don't understand. I used that one before and that one works great for me

X-Fan
06-18-2002, 12:13 PM
The 2.2.5 database backup always times out for me :(

fabz
06-20-2002, 07:01 PM
I got this :

Start MySQL Dump:
Warning: Unable to fork [mysqldump -l --add-drop-table -h localhost -uroot -p bd_plongeur 2>forums/admin/backup/error.txt
...


what is the problem ?

fabz
06-20-2002, 07:59 PM
oops... sorry !

wasn't working on the Windows test platform !

Now it's on the linux one, but the ISP has disabled the exec() function 8(

I must change ;)

Lovaboye
06-27-2002, 02:38 AM
Help, i get the

Parse error: parse error, unexpected '/' in /home/lovaboy/public_html/wf/admin/template.php on line 842

whats wrong?

MalaK_3araby
06-28-2002, 08:33 AM
Hi there

Thanks for a great hack Birdie501.

***************************
***************************
Some of you guys have the backup folder UNPROTECTED ..

at least PROTECT that folder with .htaccess ..

This is serious stuff .. so take it seriousley.
***************************
***************************

Keyser S?ze
07-01-2002, 05:48 PM
could someone explain how this works, i made a backup of my database and am moving to a new one (server) but where do i put the database before i click "restore"??

X-Fan
07-15-2002, 04:54 AM
Well I tried using skyline's suggestion of changing the path to the mysqldump command, and still no luck.

I can't use the default backup as it times out for me, and I can't use this because although it tells me it did the backup, there's no file!

I DESPERATELY need to back up my database. Can anyone help?!?!?

Birdie501
07-15-2002, 06:52 AM
all i can say is:
Ask your hoster!

Sorry :)

X-Fan
07-15-2002, 07:15 AM
So much for support for this hack, then.

Time to uninstall it.

Birdie501
07-15-2002, 07:25 AM
Originally posted by X-Fan
So much for support for this hack, then.

Time to uninstall it.

Hey, i dont know what functions your hoster provide!
The script works!!!!

So the reason has to be at your hoster! I am not your hoster so i don't know any details.

Why dont you ask your hoster first before posting that ++++?

X-Fan
07-15-2002, 07:32 AM
I HAVE asked my host. mysqldump IS installed on my server. But your hack is NOT working!

TreizeAtreides
07-23-2002, 06:41 AM
I tried to install the hack aswell but for some reason I can't acces the screen itself, ones I click the backup/restore tab it just gives a 404 error file not found can someone help me out here?$pfad="/home/planets/public_html/forum/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/forum/admin/backup/"; // http://... with / at the end

nghiasi
07-29-2002, 02:23 PM
Why When I downloaded it is .txt rather than .gz?

Mystic Gohan
08-23-2002, 09:17 PM
OK I am kinda angery about this also. I have a dabase I moved I saw this hack and was like WOOPI but I try to work it I upload my previous database from other host and on my new one I see that acceptance that it all went though right BUT I dont have my templates or anything back no style no nothin. any help?

Barret
08-26-2002, 12:53 AM
Does this work for 2.2.6?

Slynderdale
08-26-2002, 03:27 PM
If you have shell access you can use it to take a backup .sql. like made by this hack and esily restore it just have the backup on the server where you wanna restore the backup to and then open shell and type

mysql -uUSERNAME -p dbname < /path/to/dump.sql

and it should restore the database.


If you dont have a site that has shell i think www.fatcake.com gives out free accounts with shell, you also get 3 url's in case you dont like the fatcake one, you get a joker.net and so on one too.

wolfe
09-03-2002, 10:31 PM
what if GZIP is desabled is here another way around it with no zip

Mithan
09-07-2002, 03:33 PM
Hello, I am having problems with the restore feature.

It says "ok" for everything, but it doesn't actually restore anything.

The backup works fine.

Any idea what may cause this?

Thanks.

XtremeVigilante
09-16-2002, 12:04 AM
I am having the exact same problem. The backup works perfectly and everything is there. But when I restore it says OK for everything but nothing is really restored.

XtremeVigilante
09-17-2002, 03:54 PM
Well never mind. Birdie this hack is great I was just retarded and didn't hack the backup going intot he right folder.

Dark Shogun
09-29-2002, 12:09 AM
When I click the download link it shows text. If you right click it and choose save as then it downloads but do you know how I can make it download by just regularly clicking on it?

Dark Shogun

Dark Shogun
09-29-2002, 12:14 AM
Cancel the part about right clicking. My database is only 938kb and when I downloaded the zip file it was over 2mb's. When I downloaded it with DAP it downloaded 123.7kb which is probably right. Do you know what is wrong?

Dark Shogun

refertech
10-05-2002, 11:55 AM
I keep getting:

mysqldump: Got error: 1045: Access denied for user:
'user@mysiteIPaddress (Using password: YES) when trying to connect

I know im using the right pass and user? I have email my host and they say i support all the requirements. But i keep getting this error text in my backup directory> Could it be because they require me to log in using ssh and not telnet?

Any help would be appreicated. This is a great hack.

Thanks,

Mark

XtremeVigilante
10-25-2002, 01:31 PM
Help ASAP Please!!!!


$db_host="localhost";
$db_username="ldeacon";
$db_passwort="XXXX";
$db_name="ldeacon";
$pfad="/usr/local/apache/htdocs/public_html/upload/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://cgi-bin.spaceports.com/~ldeacon/upload/admin/backup/"; // http://... with / at the end
$dateiname=date('U'); // not to change!. Unique filename will be used


Get: File apache/htdocs/public_html/upload/admin/backup/backup.sql.gz not found!

What's wrong??

XtremeVigilante
10-27-2002, 07:53 AM
Can anyone help??

Breeze
10-30-2002, 01:08 PM
But I have telnet with them so it doesn't matter that much now. I have moved to a new server and need to restore without telnet (they don't allow it).

When I try running this hack on new server it saves an empty file with date.sql.gz it does not save the error file like it should.

Can someone tell me if this hack is trying to access mysql and maybe they are blocking it?
Is there some way to test what my new server will allow?

I am trying to learn this php / mysql stuff but my eyes keep blurring out on me :D

NTLDR
10-30-2002, 01:51 PM
You may find that the script cannot connect, I've tried this one a server I didn't have SSH access to and it wouldn't restore at all. Check with your host and see if they allow you to use the exec command in PHP.

Breeze
10-30-2002, 02:04 PM
Thank You for fast reply. I have been checking all over the net for the answer. I figured that exec() was going to be problem. Looks like they have it running in safe mode and using the /bin directory. I tried placing this in there:
<?
exec('mysqldump -u username -p password db_name > db_name.sql');
?>
It wouldn't allow me to do that so I tried cgi-bin and I got server error when I ran it.

Not that they will but if I ask them to turn on some feature of PHP what exactly would I say? So as not to sound too stupid.

Thanks again

NTLDR
10-30-2002, 02:08 PM
You could try changing exec to system that may work. If not I suggest asking your host to import your database as they don't give you SSH access.

Breeze
10-30-2002, 03:10 PM
Tried using system() as for the mysqldump it didn't work. Did get it to list a directory but that may be nothing.

I wonder if they can allow a mysqldump command without having to worry about security?

I noticed in the /bin folder there is a file named ls
When I tested this out:
<?php
system('ls / -l');
?>

It showed a list of files. Guess what I am trying to figure out is can my new host setup something that is secure to allow backingup/restore?

TheSaint-AeD
11-08-2002, 01:49 PM
hmm...

my backup worked perfectly, but the restore doesn't work at all. I wanted to move servers using this, uploaded the compressed sql-file to my admin/backup directory on the new server, changed the variables, and clicked restore.

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

is the answer, but actually the db isn't restored.

ULTIMATESSJ
01-03-2003, 08:11 AM
i'm getting the same error as TheSaint-AeD, so any chance of getting any assistance with this, i need to get a backup on with this hack, since my host has a 2MB upload limit and the host won't upload the backup for us

Birdie501
01-03-2003, 09:34 AM
Hi,

i am sorry. Unfortunately I don't know how to help you!

AloneEagle
01-09-2003, 07:44 PM
work with any version???

JHSoundZ
01-12-2003, 11:38 AM
THANK YOU!!! THANK YOU!!!

our database just blanked and we cud not restore the data til we used this. the other admin is willing to bear your children if you wish. your rock! just saved us bout a weeks work getting it all back up.

he told me to add this on
- using winrar, you can gunzip the existing backup files taken from vb.

Birdie501
01-13-2003, 05:18 AM
You're welcome! :) I am happy that it works for you.

linuxfreaky
02-15-2003, 10:30 AM
hi Birdie501

guess what man i payed for vbultin just to download ur hack lol
man i swear iam not ++++ing u i have diffrant forums and our hosting servers dont alow ssh or tel net
i have aproblem iam not geting any errors at all
every thing is cool the back up but in restore it says every thing restored
you go to the forum and boof nothing restored i did that over
4 times hosting on free bsd and all is cool as i told u no erros
just that the restore goes ok but in real it wont restore any thing
any idea will be so much happy 2 hear it
regards :glasses:

Strider Xero
02-17-2003, 07:13 PM
does this work with 2.2.9 and 2.3.0??

ZiRu$
02-28-2003, 04:50 AM
Originally posted by TheSaint-AeD
hmm...

my backup worked perfectly, but the restore doesn't work at all. I wanted to move servers using this, uploaded the compressed sql-file to my admin/backup directory on the new server, changed the variables, and clicked restore.

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

is the answer, but actually the db isn't restored.

yah same here and with almost everyone

Drowned
03-03-2003, 03:11 AM
It doesn't create any file. I triple checked everything, and yes, my host can do dumps. Backup folder is still empty.

BTW, thanks for you "great" support... hehe, yeah right... :disappointed:

laycomp
03-14-2003, 09:32 PM
Hello Birdie501,

I am unable to restore db.

I feel something is wrong in the $programm variable:

// ###################### Start Dorestore #######################

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

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

What should go in the $programm variable line please?

by the way, I am using Apache on Windows and using v2.3 and all is so far working fine, thanks for this useful hack! :)

laycomp
03-17-2003, 05:52 AM
never mind, I discovered the problem was a mistake in the hack code that wasn't even updated in the original instruction file, so if you're going to install be sure to read all the post and look for the area of the code that needs to be changed.

Boofo
03-17-2003, 06:28 AM
Today at 01:52 AM laycomp said this in Post #127 (https://vborg.vbsupport.ru/showthread.php?postid=367936#post367936)
never mind, I discovered the problem was a mistake in the hack code that wasn't even updated in the original instruction file, so if you're going to install be sure to read all the post and look for the area of the code that needs to be changed.

I read the whole thread and I must have missed the code change you were talking about. Can you point me to it, please? ;)

laycomp
03-17-2003, 10:55 PM
mmm... I tried going to the whole thread too to point out the changes, but sorry, maybe I didn't look good enough, anyways, I made the change in my install file and attached it, if you use it you shouldn't go wrong -at least I didn't.

Compare mine with the original install txt file and when you see the difference then you can search for the text and find the original posts that talks about the change in code. This I suggest you do.

I'd wish that whenever changes were made, developers took the time to upload the new files, so many people's time is plain wasted :(

laycomp
03-17-2003, 10:57 PM
02-17-03 at 09:13 PM Strider Xero said this in Post #123 (https://vborg.vbsupport.ru/showthread.php?postid=355150#post355150)
does this work with 2.2.9 and 2.3.0??

I am using 2.3.0 and yes, it did work fine.

Boofo
03-17-2003, 11:09 PM
Today at 06:55 PM laycomp said this in Post #129 (https://vborg.vbsupport.ru/showthread.php?postid=368347#post368347)
mmm... I tried going to the whole thread too to point out the changes, but sorry, maybe I didn't look good enough, anyways, I made the change in my install file and attached it, if you use it you shouldn't go wrong -at least I didn't.

Compare mine with the original install txt file and when you see the difference then you can search for the text and find the original posts that talks about the change in code. This I suggest you do.

I'd wish that whenever changes were made, developers took the time to upload the new files, so many people's time is plain wasted :(

Is this the wrong file you attached? ;)

laycomp
03-18-2003, 02:55 PM
Today at 01:09 AM Boofo said this in Post #131 (https://vborg.vbsupport.ru/showthread.php?postid=368353#post368353)


Is this the wrong file you attached? ;)

You mean I didn't attach file!? Sorry, here it is again.

partang2
03-30-2003, 05:53 AM
Nope, I can't get it to work. It says that all is ok but no restore is done.... Anyone found a way to do this?

jackyhow
04-09-2003, 02:20 AM
03-30-03 at 08:53 AM partang2 said this in Post #133 (https://vborg.vbsupport.ru/showthread.php?postid=375376#post375376)
Nope, I can't get it to work. It says that all is ok but no restore is done.... Anyone found a way to do this?


i have the same problem, buddy

jackyhow
04-09-2003, 02:39 AM
there is a lot of problems with this hack,,,,,.....................maybe dont use it

Boofo
04-09-2003, 09:11 AM
Can't you restore it through phpmyadamin if you need to, if the restore feature doesn't work?

Yuber
05-06-2003, 12:11 AM
I tried to restore and it said:

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


But nothing changed, my old database wasn't restored? and it was called backup.sql.gz

Strider Xero
05-06-2003, 01:28 AM
This worked for the older versions of vB. I really wish someone would continue with this script because I think it's a good idea. If there's a backup feature, there should always be a restore feature as well.

sajjid
05-10-2003, 01:12 AM
03-18-03 at 01:55 AM laycomp said this in Post #129 (https://vborg.vbsupport.ru/showthread.php?postid=368347#post368347)
mmm... I tried going to the whole thread too to point out the changes, but sorry, maybe I didn't look good enough, anyways, I made the change in my install file and attached it, if you use it you shouldn't go wrong -at least I didn't.
Compare mine with the original install txt file and when you see the difference then you can search for the text and find the original posts that talks about the change in code. This I suggest you do.
I'd wish that whenever changes were made, developers took the time to upload the new files, so many people's time is plain wasted :(
03-18-03 at 05:55 PM laycomp said this in Post #132 (https://vborg.vbsupport.ru/showthread.php?postid=368606#post368606)
You mean I didn't attach file!? Sorry, here it is again.
i still fail to make connection as to what you are saying i looked through the whole of the thread and didnt see code change niether in you file its same as Birdie501.
as matter of fact you really have confused the me as the first attchment has nothing to do with the hack

iggy123
05-10-2003, 09:27 AM
I am using 2.30 and it worked fine for me - my db was screwed, I back it up every other day - and delete the old one,and I restored it using this hack and it worked a dream. I only lost 1 days posts (approx 300) so I was well happy!


update since moving the forums to a new folder I am having real problems.....

I have altered the templete.php to show

$pfad="home/virtual/site97/fst/var/www/html/forums/admin/backup";
$download_url="http://XXXX.net/forums/admin/backup/";


everything appears to be fine - i get the message "db backed up" etc
but when i down load the db - it tells me that the file is corrupt.
I have checked the folder permissions etc and everything appears to be fine?

gmarik
06-24-2003, 05:42 PM
Have you ever thought of adding .zip feature?

lasto
08-25-2003, 01:40 PM
excellant wot can i say

/me click installed

took less than 2 secs to do 2meg test file

now small question anyone know what max file is this can do before times out or dont it work that way.

Best way ive seen of doing a databse backup and restore

/me is happy

lasto
08-25-2003, 01:51 PM
forgot to say i tried to do a file though phpmyadmin and it crashed out and would`nt do a 1.7 meg file

So i contacted host and they only allow it to be done though SSH but this makes it a lot better with this hack :)

chrisvonc
10-24-2003, 03:09 PM
I gave this a whirl on 2.3.2 and I get the same thing of not finding the backup package. I did run the root.php, made sure the paths reflected that as well as checked again a few more times. I saw someone say they got this running on 2.3.0 but has anyone tried this on 2.3.2?

It also seems to run instantly which I thought was odd since the regular .sql backup file generated by the built in process in vB takes a minute or so to process before the d/l starts. I would have though even though creating the backup file on the server it would take a few seconds to run. Is this normal?

Thanks,

Chris

klaattu
10-25-2003, 01:17 AM
Installed in Both my forums and it works ok (well the back up so far I ll make a dummy forum tomorrow and test the restore, but so far so good

Click "install"

cool thanks!both are 2.3.0.

klaattu
01-16-2004, 04:02 PM
Well I tried to restore the backup sinc eour host lost everuthing (even backups) go figure!!!
I try to resptere everything sais its ok but no database, Ill contact my provider so I can check mySQLdump problem...

any other hints?

tuanpig
01-31-2004, 07:23 AM
I need ver for vb3! thanks

lasto
02-04-2004, 06:51 PM
anyone know if this works on vb rc3 as i used this all time on vb2 but not sure if will work on new one.

Its a good program netherless

o0stephane0o
07-18-2004, 04:08 PM
It´s such a usefull hack, can´t someone port it to VB3?
It was so nice on vb2...

Birdie501
07-18-2004, 06:53 PM
Hi,

I am sorry but i can't give support for vb 3 because I dont have a licence for that version.

o0stephane0o
07-18-2004, 09:32 PM
Is there anyone who has the license and can help me to modify that hack?
Maybee birdie, I own the license, you could help me to modify the files to make it owk on vb3?