Raj KAJ (scottobear) wrote,
Raj KAJ
scottobear

TGIF – Oh good lord.

Casual Friday, wearing khakis and a plaid flannel shirt.

Nobody here to appreciate it as most folks are teleworking today. It’s a wasteland… Just me and a lone coyote in the distance, braying at the moon.

*tumbleweed rolls by and a dust devil spins*

Upside, minimal distractions to review the system and pick up my chipped card.

edit: Check that – my teleworking chief pranked me and practically gave me a heart attack. 
I was helping with a postgreSQL database, and he gave me the old “OMG it just dropped all of the tables.” I very nearly keeled over.

For Reference -

pg_dump dbname > outfile

The ability of pg_dump and psql to write to or read from pipes makes it possible to dump a database directly from one server to another; for example:

pg_dump -h host1 dbname | psql -h host2 dbname

Important: The dumps produced by pg_dump are relative to template0. This means that any languages, procedures, etc. added to template1 will also be dumped by pg_dump. As a result, when restoring, if you are using a customized template1, you must create the empty database from template0, as in the example above.

For advice on how to load large amounts of data into PostgreSQL efficiently, refer to Section 13.4.


Me – [10:15 AM]: would     psql -d dbase1 -f dbase1.sql

work to repopulate or maybe I’m thinking around the problem

Him [10:16 AM] : omg! that dropped the entire database!!!!

Me [10:17 AM]: oh shit

Him [10:17 AM] : GOTCHA! :P

Me [10:17 AM]: oh double shit. :)

Him [10:17 AM]: I’m just going to let the contractor figure it out

Me [10:17 AM]: sound plan. I’m going to head down to get my piv and a fresh pair of undies.

Him [10:18 AM]: lol

Me [10:18 AM]: you got me good!

Him [10:18 AM]:  :D

Originally published at The Scotto Grotto. You can comment here or there.

Tags: uncategorized
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments