Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

How to copy a PG database

Question posted by: G Lam (Guest) on November 23rd, 2005 02:04 AM
Hi,
I have a PG database "foodsvc" and I want to make a copy of it with a new
name "newfoodsvc". So that I can play with the "newfoodsve" without any
damage to the "foodsvc".
How can I do that?
Thank you.
GL



Heimlich Manure's Avatar
Heimlich Manure
Guest
n/a Posts
November 23rd, 2005
02:04 AM
#2

Re: How to copy a PG database
Think in terms of

pgdump foodsvc | sed s/foodsvc/newfoodsvc/g | psql

"G Lam" <No_spam@anywhere.com> wrote in message
news:5MOdnUmAQJW7RTzfRVn-uQ@comcast.com...[color=blue]
> Hi,
> I have a PG database "foodsvc" and I want to make a copy of it with a new
> name "newfoodsvc". So that I can play with the "newfoodsve" without any
> damage to the "foodsvc".
> How can I do that?
> Thank you.
> GL
>
>
>[/color]



 
Not the answer you were looking for? Post your question . . .
189,872 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors