Seite 1 von 1

Restore Database ???

Verfasst: 14.11.2002 14:07
von Aqua
Hi ,
ich habe folgendes Problem :
Da ich Depp mein Forum von 2.0 nicht auf eine aktuelle Version upgedated hatte , bin ich kürzlich Opfer eines Kiddies geworden , der mir mein Forum ruiniert hat ( User gelöscht / Posts und Foren gelöscht ) .
Da ich jedoch vor einiger Zeit ein backup gemacht hatte , wollte ich nun dieses Backup aufspielen. Dabei handelt es sich um die von phpBB erzeugte phpbb_db_backup.sql Daeti . Wenn ich mich nun in den Adminbereich einlogge und den Restore starten will ( gebe dabei dann die datei an , die sich bei mir auf der Festplatte befindet ) bekomme ich nach wenigen Sekunden eine leere Seite angezeigt ( a la dokument nicht gefunden) . Ist es überhaubt möglich ein 56 MB grosses Backup von der Platte ins Web mit DSL zu überspielen ? . Ganz abgesehen davon das es mindestens eine Stunde dauern würde . Daraufhin habe ich die phpbb_db_backup.sql ebenfalls auf den Server geladen auf dem sich das Forum befindet , da ich dachte ich könnte es von dort aus aufspielen. Jedoch kann ich im Adminbereich unter restore nicht den Pfad zu einer Internetseite angeben , sondern lediglich auf meine eigenen Festplatten .
Gibt es da vielleicht eine Möglichkeit es doch irgendwie hinzubekommen ??? .
Vielleicht mit php myadmin ?. Ich wüsste jedoch nicht wo ich dort ein update aufspielen kann , und ob ich da einfach die phpbb_db_backup.sql überspielen kann ? . Und wenn ja , wie ?.

1000 Dank im vorraus .

Verfasst: 14.11.2002 14:42
von Mister_X

Verfasst: 14.11.2002 17:02
von Aqua
<?php

system("/usr/bin/mysql -uUSERNAME -pPASSWORT -hIhr.Datenbank.Server.de DATENBANKNAM< /VOLLER_PFAD/dump.sql", $fp);

if ($fp==0) echo "Daten importiert"; else echo "Es ist ein Fehler aufgetreten";

?>


Meine Daten :

$dbhost = "mysql5.webpack.hosteurope.de";

$dbname = "meine-domain_de";

$dbuser = "ftp0815";

$dbpasswd = "meinpasswort";

$table_prefix = "phpbb_";

Die “phpbb_db_backup.sql” liegt momentan ebenfalls auf dem Server ( also auf www.meine-domain.de/ phpbb_db_backup.sql )



Nun weiss ich leider nicht genau wo ich was einfügen soll und ob ich Sachen wie “-hlhr” lersetzen soll oder nicht .

Es wäre sehr sehr nett wenn ihr mir da ein wenig weiterhelfen könntet .

Danke im vorraus .
[/quote]

Verfasst: 14.11.2002 19:28
von Gast
/usr/bin/mysql Ver 11.18 Distrib 3.23.51, for pc-linux-gnu (i686) Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Usage: /usr/bin/mysql [OPTIONS] [database] -?, --help Display this help and exit. -A, --no-auto-rehash No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. -B, --batch Print results with a tab as separator, each row on a new line. Doesn't use history file. --character-sets-dir=... Directory where character sets are located. -C, --compress Use compression in server/client protocol. -D, --database=.. Database to use. --default-character-set=... Set the default character set. -e, --execute=... Execute command and quit. (Output like with --batch) -E, --vertical Print the output of a query (rows) vertically. -f, --force Continue even if we get an sql error. -g, --no-named-commands Named commands are disabled. Use \* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. -G, --enable-named-commands Named commands are enabled. Opposite to -g. -i, --ignore-spaces Ignore spaces after function names. -h, --host=... Connect to host. -H, --html Produce HTML output. --local-infile=[1|0] Enable/disable LOAD DATA LOCAL INFILE -L, --skip-line-numbers Don't write line number for errors. --no-pager Disable pager and print to stdout. See interactive help (\h) also. --no-tee Disable outfile. See interactive help (\h) also. -n, --unbuffered Flush buffer after each query. -N, --skip-column-names Don't write column names in results. -O, --set-variable var=option Give a variable an value. --help lists variables. -o, --one-database Only update the default database. This is useful for skipping updates to other database in the update log. --pager[=...] Pager to use to display results. If you don't supply an option the default pager is taken from your ENV variable PAGER (). Valid pagers are less, more, cat [> filename], etc. See interactive help (\h) also. This option does not work in batch mode. -p[password], --password[=...] Password to use when connecting to server If password is not given it's asked from the tty. -P, --port=... Port number to use for connection. -q, --quick Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file. -r, --raw Write fields without conversion. Used with --batch -s, --silent Be more silent. -S --socket=... Socket file to use for connection. -t, --table Output in table format. -T, --debug-info Print some debug info at exit. --tee=... Append everything into outfile. See interactive help (\h) also. Does not work in batch mode. -u, --user=# User for login if not current user. -U, --safe-updates[=#], --i-am-a-dummy[=#] Only allow UPDATE and DELETE that uses keys. -v, --verbose Write more. (-v -v -v gives the table output format) -V, --version Output version information and exit. -w, --wait Wait and retry if connection is down. Default options are read from the following files in the given order: /etc/my.cnf /var/lib/mysql/my.cnf ~/.my.cnf The following groups are read: mysql client The following options may be given as the first argument: --print-defaults Print the program argument list and exit --no-defaults Don't read default options from any options file --defaults-file=# Only read default options from the given file # --defaults-extra-file=# Read this file after the global files are read Possible variables for option --set-variable (-O) are: connect_timeout current value: 0 max_allowed_packet current value: 16777216 net_buffer_length current value: 16384 select_limit current value: 1000 max_join_size current value: 1000000 Es ist ein Fehler aufgetreten

Verfasst: 14.11.2002 20:49
von Aqua
<?php
// Bitte hier Ihre Daten eintragen
$host= 'mysql5.bla.dingsbums.de';
$user= 'meinbenutzer';
$pass= 'meinpass';
$db= 'meine_seite_de';

// Befehl ausführen
system(sprintf(
'mysql -h %s -u %s -p%s %s < /is/htdocs/0000/www.meineseite.de/phpbb_db_backup.sql',
$host,
$user,
$pass,
$db
));
echo '+DONE';
?>
Weil ich mit dem anderen Script eine Fehlermeldung bekam hab ich es mit diesem gemacht .
Das Forum ist soweit in der Datenbank aufgespielt . Jedoch komme ich jetzt nicht auf die Foren .
Es heisst : " Could not query forums information
Daraufhin habe ich den Debug Modus aktiviert und bekam folgendes :
SQL Error : 1146 Table 'meine_seite_de.phpbb_posts' doesn't exist

SELECT f.*, p.post_time, p.post_username, u.username, u.user_id FROM (( phpbb_forums f LEFT JOIN phpbb_posts p ON p.post_id = f.forum_last_post_id ) LEFT JOIN phpbb_users u ON u.user_id = p.poster_id ) ORDER BY f.cat_id, f.forum_order

Line : 165
File : /is/htdocs/000/www.meine-seite.de/phpBB2/index.php
Das backup stammt vom phpBB 2.0 RC board und momentan habe ich die 2.03 er . Kann es daran liegen ? . Oder liegt es eher daran das das Backup nicht richtig funktioniert hat ? . Weil mit dem ersten php script kam ja die Fehlermeldung . Es könnte doch sein das mit dem 2 ten Script die nötigen Tabellen nicht erstellt werden konnten , oder ? . Und wo liegt eigenlich der Unterschied zwischen den 2 php scripten ? .

Zumindest habe ich keine Tabelle die da lautet :
'meine_seite_de.phpbb_posts' .

Was ratet ihr mir nun in diesem Falle ?? :roll:

Verfasst: 14.11.2002 21:27
von Aqua
Ich habe mir die backup datei mal mit nem editor angesehen , und dort ist auch das erstellen der tabelle posts aufgeführt :
#
# TABLE: phpbb_posts
#
DROP TABLE IF EXISTS phpbb_posts;
CREATE TABLE phpbb_posts(
,
PRIMARY KEY (post_id),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY poster_id (poster_id),
KEY post_time (post_time)
);

#
# Table Data for phpbb_posts
#

INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, poster_ip, post_username, enable_bbcode, enable_html,
.......