Toon posts:

[mysql] backup

Pagina: 1
Acties:

Verwijderd

Topicstarter
ik wil graag mn hele mysql server backuppen (dus niet per db)
in de seacht heb ik het volgende gevonden:
code:
1
mysqldump -aA -u root -p[rootpw] > dumpfile.dump

Maaar als ik dat dan doe dan kijg ik de volgende fout:
code:
1
mysqldump: invalid option -- a

ik heb in de help van mysqldump gekeken, en daar staat dat het ook kan met -all (ipv -a). Als ik dat dus doe dan krijg ik de help van mysqldump in de dumpfile.
iemand enig idee hoe ik alle dbs in 1 keer kan backuppen?

  • Zwelgje
  • Registratie: November 2000
  • Laatst online: 17-08 09:02
hier werkt het gewoon :?

welke mysql en mysqldump heb je ? (versienummer)

A wise man's life is based around fuck you


Verwijderd

Topicstarter
code:
1
2
mysql -V
mysql  Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686)

en
code:
1
2
mysqldump -V
mysqldump  Ver 7.1 Distrib 3.22.32, for pc-linux-gnu (i686)

komt toch aaridg overeen he.
dit is trouwens de standaard geinstalleerde mysql die met apt-get op debian binnenkwam..

  • Zwelgje
  • Registratie: November 2000
  • Laatst online: 17-08 09:02
kheb hier mysql 3.23.47 en mysqldump 8.16

opgehaald bij www.mysql.com (via een mirror uiteraard)

A wise man's life is based around fuck you


Verwijderd

Topicstarter
maar zal het aan mysql of aan mysqldump liggen??
want anders haal ik mn hele apt-get systeem overhoop...

  • QuarK
  • Registratie: Maart 2000
  • Laatst online: 09-07 21:48
Het ligt aan mysqldump.
Ik heb ook gemerkt dat de mysqldump opties veranderd zijn tussen de mysql 3.22 en 3.23 release.

Gewoon even in de mysqldump manualpages kijken, is erg eenvoudig.

Verwijderd

Topicstarter
ik heb geen man-page over mysqldump :(

maar ik heb alle opties geprobeerd die in mysqldump --help staan.. (-a/-A/-all) werken allemaal niet
weet er iemand welke opties werken dan wel? hoe kom ik daar achter?

  • JaQ
  • Registratie: Juni 2001
  • Laatst online: 17:22

JaQ

als je mysqldump inklopt op je prompt en je mept op enter, krijg je de short-helplist te zien..

alle opties dus....


jl@alpha:~$ mysqldump
mysqldump Ver 7.1 Distrib 3.22.32, for pc-linux-gnu (i586)
By Igor Romanenko, Monty, Jani & Sinisa. This software is in public Domain
This software comes with ABSOLUTELY NO WARRANTY

Dumping definition and data mysql database or table
Usage: mysqldump [OPTIONS] database [tables]

-a, --all Include all MySQL specific create options
-#, --debug=... Output debug log. Often this is 'd:t:o,filename`
-?, --help Display this help message and exit.
-c, --complete-insert Use complete insert statements.
-C, --compress Use compression in server/client protocol
-e, --extended-insert Allows utilization of the new, much faster
INSERT syntax
--add-drop-table Add a 'drop table' before each create
--add-locks Add locks around insert statements
--allow-keywords Allow creation of column names that are keywords
--delayed-insert Insert rows with INSERT DELAYED
-F --flush-logs Flush logs file in server before starting dump
-f, --force Continue even if we get an sql-error.
-h, --host=... Connect to host.
-l, --lock-tables Lock all tables for read.
-t, --no-create-info Don't write table creation info.
-d, --no-data No row information.
-O, --set-variable var=option
give a variable a value. --help lists variables
--opt Same as --add-drop-table --add-locks --all
--extended-insert --quick --lock-tables
-p, --password[=...] Password to use when connecting to server.
If password is not given it's solicited on the tty.
-P, --port=... Port number to use for connection.
-q, --quick Don't buffer query, dump directly to stdout.
-Q, --quote-names Quote table and column names with `
-S, --socket=... Socket file to use for connection.
-T, --tab=... Creates tab separated textfile for each table to
given path. (creates .sql and .txt files).
NOTE: This only works if mysqldump is run on
the same machine as the mysqld daemon.
-u, --user=# User for login if not current user.
-v, --verbose Print info about the various stages.
-V, --version Output version information and exit.
-w, --where= dump only selected records; QUOTES mandatory!
EXAMPLES: "--where=user='jimf'" "-wuserid>1" "-wuserid<1"
Use -T (--tab=...) with --fields-...
--fields-terminated-by=...
Fields in the textfile are terminated by ...
--fields-enclosed-by=...
Fields in the importfile are enclosed by ...
--fields-optionally-enclosed-by=...
Fields in the i.file are opt. enclosed by ...
--fields-escaped-by=...
Fields in the i.file are escaped by ...
--lines-terminated-by=...
Lines in the i.file are terminated by ...
Default options are read from the following files in the given order:
/etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysqldump 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 #

Possible variables for option --set-variable (-O) are:
max_allowed_packet current value: 1047552
net_buffer_length current value: 1047551

Egoist: A person of low taste, more interested in themselves than in me


Verwijderd

Topicstarter
klopt, daar had ik ook al in gekeken..
daar staat onderandere in:

-a, --all Include all MySQL specific create options

Maar deze opties werken dus allebij niet..
Pagina: 1