Re: [despammed] CRON Jobs and Backups - Mailing list pgsql-novice

From Andreas Kretschmer
Subject Re: [despammed] CRON Jobs and Backups
Date
Msg-id 20050606183108.GA21560@webserv.wug-glas.de
Whole thread Raw
In response to CRON Jobs and Backups  (<operationsengineer1@yahoo.com>)
List pgsql-novice
am  06.06.2005, um 10:07:39 -0700 mailte operationsengineer1@yahoo.com folgendes:
> PGUSER=postgres
> PGPASSWORD=password
> export PGUSER PGPASSWORD
> pg_dump databasename | gzip > databasename.bak.gz
>
> my interfaces is cpanel and it only gives me one line
> to type this in...  can i replace the returns with a
> space and will this still work?
>
> eg, PGUSER=postgres PGPASSWORD=password export...
>
> will databasename.bak.gz be stored in the same file as
> my database?

No, the database will be stored in 'databasename.bak.gz'.


>
> how can i store the file on my local computer?

Call pg_dump from your computer, but with -h - parameter.


> i finally have some data in my db and i scared of
> losing it.  *real* scared!

?

I used today:

pg_dump -h 'old_server' -n 'schema' -U 'user' 'db' | psql -U 'user' 'new_deb'

(just as a brain-dump, no guarantee)

to transfer a Database from a old to a new Server.



Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

pgsql-novice by date:

Previous
From: Philip Hallstrom
Date:
Subject: Re: CRON Jobs and Backups
Next
From: Tom Lane
Date:
Subject: Re: CRON Jobs and Backups