DBS_DUMPTABDATA(1p)

πŸ“¦
version 0.21 Β· 3 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– DBS_DUMPTABDATA(1p) πŸ’–

okay bestie so this is dbs_dumptabdata, and it lives in the User Contributed Perl Documentation section of the manual (section 1p, iykyk). she's a perl script and she's here to help you get your database out of the database and into files. let's go 🫢


✨ NAME ✨

dbs_dumptabdata β€” literally creates a file set with SQL table data. that's the whole vibe. πŸ’…


🌸 DESCRIPTION 🌸

so dbs_dumptabdata is a utility whose entire main character job is to create a file set with SQL table data. no cap.

here's the tea: for each table in the database, dbs_dumptabdata calls the appropriate dumper utility, and it points the output at a file named table.sql in the current directory. so you just get a lil pile of files, one per table, sitting right there. iconic. πŸŽ€

and yes, dbs_dumptabdata asks for a password if necessary β€” she's polite like that. πŸ”


πŸ¦‹ COMMAND LINE PARAMETERS πŸ¦‹

okay so the required command line parameters are:

  1. the DBI driver β€” which is "Pg" for Postgres or "mysql" for MySQL
  2. the database name

and then there's a third parameter which is optional (she's flexible πŸ’) and it specifies the database user and/or the host where the database resides. like, for example: "racke", "racke@linuxia.de" or "@linuxia.de".


πŸŽ€ COMMAND LINE OPTIONS πŸŽ€

🌟 -t TABLE[,TABLE,...], --tables=TABLE[,TABLE,...]

comma-separated list of tables to dump. just say which ones you want and she'll dump those ones. periodt. ✨

🌟 --exclude-matching-tables=REGEXP

excludes any table matching the regular expression REGEXP from dumping. so if a table's name matches the regexp, she's not dumping it. not today. πŸ™ˆ

🌟 --use-printtab

uses the generic dump (similar to "dbs_printtab") instead of the dumper utility provided by the DBMS. so basically you're swapping out the DBMS's own dumper utility for the generic one. lowkey a whole different flavour. πŸ“


πŸ’€ BUGS πŸ’€

msql is not supported. that's it. that's the bug note. msql girlies, this one's not for you 😭

πŸ‘‘ AUTHOR πŸ‘‘

Stefan Hornburg (Racke), racke@linuxia.de


🌈 SEE ALSO 🌈


and that's the whole page bestie!! this one shipped with perl v5.32.0 and the page is dated 2021-01-06 β€” go forth and dump those tables, you absolute legend πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from