DBS_EMPTY(1p)

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

πŸ’– NAME πŸ’–

dbs_empty β€” the little utility that empties SQL databases, like a full factory reset but for your data 🌸


✨ DESCRIPTION ✨

okay so bestie, picture this: you have an SQL database and you want it absolutely, completely, no-notes, no-leftovers scrubbed of every scrap of data. That's literally what dbs_empty does. It's a utility that completely erases any data from a given SQL database. Gone. Poof. Not a single row left to tell the tale πŸ’…


πŸŽ€ COMMAND LINE PARAMETERS πŸŽ€

The required command line parameters are:

  1. the DBI driver β€” and before you ask, it's "Pg" for Postgres or "mysql" for MySQL 🫢
  2. the database name

The third parameter is optional and it specifies the database user and/or the host where the database resides. Like so:

  • "racke" β€” just the user
  • "racke@linuxia.de" β€” user and host
  • "@linuxia.de" β€” just the host

πŸ¦‹ COMMAND LINE OPTIONS πŸ¦‹

--exclude-matching-tables=REGEXP

Excludes any table matching the regular expression REGEXP from dumping πŸ™ˆ so if there's a table you're emotionally attached to and refuse to let go of, this is your girl.

-t, --tables

Remove tables from database too πŸ‘‘ not just the data β€” the whole tables, bye. No cap.


🌈 AUTHOR 🌈

Stefan Hornburg (Racke), racke@linuxia.de β€” the icon who made this, we stan πŸ’œ


⭐ SEE ALSO ⭐


perl v5.32.0 Β· 2021-01-06 β€” that's the version and date this page was living in, bestie, and honestly? iconic. go empty some databases, slay, and remember: back up first, fr fr πŸ’–βœ¨

πŸ“¦ where this page comes from