scottobear: (Default)
[personal profile] scottobear

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.

Profile

scottobear: (Default)
scott von berg

April 2017

S M T W T F S
       1
2 345678
9 10 11 12 13 14 15
16 1718 19 20 21 22
23 2425 26 2728 29
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 26th, 2026 09:51 pm
Powered by Dreamwidth Studios