Backup of database

Поиск
Список
Период
Сортировка
Искать

Backup of database

От:
joka veera Venkataramana <ramanajvv@gmail.com>
Дата:
Hi,

We have Postgresql server on Linux environment and have one database.
Now we are planning to take the dump of database with pg_dump utility.

To use pg_dump utility do I need to install Pgadmin on Linux environment?

If yes, do we need to install Pgadmin with root user? because Postgre server instance we have installed with different user (not root user).

We are planning to take daily database dump in tar file format, so that it can occupy less space. Can you please provide the complete pg_dump and restore command for tar file format.


I know all my questions are basic, why we are asking here is  previously we were in DB2 now we moved our database to Postgre (Its new for us). Please help us.

Thanks,
Veera.




Re: Backup of database

От:
Andrew Krause <andrew.krause@breakthroughfuel.com>
Дата:
I highly recommend that you review the page in the PostgreSQL documentation for pg_dump before proceeding.   If this is new to you, this page has all the information you should need to get started (including examples at the bottom).

http://www.postgresql.org/docs/9.2/static/app-pgdump.html

You don't need pgadmin on any of your server machines.  It's really just a nice to have GUI client for the database.  I recommend using psql if you're connecting with a shell.  

On Nov 26, 2013, at 10:28 AM, joka veera Venkataramana 
 wrote:

> Hi,
> 
> We have Postgresql server on Linux environment and have one database. 
> Now we are planning to take the dump of database with pg_dump utility.
> 
> To use pg_dump utility do I need to install Pgadmin on Linux environment?
> 
> If yes, do we need to install Pgadmin with root user? because Postgre server instance we have installed with different user (not root user).
> 
> We are planning to take daily database dump in tar file format, so that it can occupy less space. Can you please provide the complete pg_dump and restore command for tar file format.
> 
> 
> I know all my questions are basic, why we are asking here is  previously we were in DB2 now we moved our database to Postgre (Its new for us). Please help us.
> 
> Thanks,
> Veera.
> 
> 
> 
> 


Re: Backup of database

От:
Scott Ribe <scott_ribe@elevated-dev.com>
Дата:
On Nov 26, 2013, at 9:28 AM, joka veera Venkataramana  wrote:

> I know all my questions are basic, why we are asking here is  previously we were in DB2 now we moved our database to Postgre (Its new for us). Please help us.



Personally, for daily backups, I like pg_dumpall | bzip2.

-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





Re: Backup of database

От:
Payal Singh <payal@omniti.com>
Дата:
You don't need to install anything for using pg_dump. You can find this command within postgres bin directory, along with psql and other commands. 

A simple pg_dump backup command would look like:

/opt/pgsql/bin/pg_dump -Ft db_name > $FILE

Where $FILE is the name of the backup file you will set. '-F' sets the dump format, and 't' stands for tar

More info can be found in the documentation at http://www.postgresql.org/docs/9.2/static/app-pgdump.html

Payal Singh,
OmniTi Computer Consulting Inc.
Junior Database Architect,
Phone: 240.646.0770 x 253


On Tue, Nov 26, 2013 at 11:28 AM, joka veera Venkataramana <ramanajvv@gmail.com> wrote:
Hi,

We have Postgresql server on Linux environment and have one database.
Now we are planning to take the dump of database with pg_dump utility.

To use pg_dump utility do I need to install Pgadmin on Linux environment?

If yes, do we need to install Pgadmin with root user? because Postgre server instance we have installed with different user (not root user).

We are planning to take daily database dump in tar file format, so that it can occupy less space. Can you please provide the complete pg_dump and restore command for tar file format.


I know all my questions are basic, why we are asking here is  previously we were in DB2 now we moved our database to Postgre (Its new for us). Please help us.

Thanks,
Veera.





Re: Backup of database

От:
AJ Weber <aweber@comcast.net>
Дата:

On 11/26/2013 11:56 AM, Scott Ribe wrote:
> On Nov 26, 2013, at 9:28 AM, joka veera Venkataramana  wrote:
>
>> I know all my questions are basic, why we are asking here is  previously we were in DB2 now we moved our database to Postgre (Its new for us). Please help us.
> 
>
> Personally, for daily backups, I like pg_dumpall | bzip2.
If you're using some kind of rsync or rsnapshot to help with backups, 
check-out "gzip --rsyncable".  It purports to keep the compressed 
archive in a better format for rsync-type (changed-block-only) 
transfers, at the expense of not using the most advanced algorithm.

I have a script that dumps my db to a local gz file, and alternates 
naming it with a .0 or .1 so I always have the last two backups (and 
then those backup/archive files are rsync'ed to another machine).

-AJ

Re: Backup of database

От:
joka veera Venkataramana <ramanajvv@gmail.com>
Дата:
Thank You All...It Worked


On Tue, Nov 26, 2013 at 1:32 PM, AJ Weber <aweber@comcast.net> wrote:

On 11/26/2013 11:56 AM, Scott Ribe wrote:
On Nov 26, 2013, at 9:28 AM, joka veera Venkataramana<ramanajvv@gmail.com>  wrote:

I know all my questions are basic, why we are asking here is  previously we were in DB2 now we moved our database to Postgre (Its new for us). Please help us.
<http://www.postgresql.org/docs/9.3/interactive/backup.html>

Personally, for daily backups, I like pg_dumpall | bzip2.
If you're using some kind of rsync or rsnapshot to help with backups, check-out "gzip --rsyncable".  It purports to keep the compressed archive in a better format for rsync-type (changed-block-only) transfers, at the expense of not using the most advanced algorithm.

I have a script that dumps my db to a local gz file, and alternates naming it with a .0 or .1 so I always have the last two backups (and then those backup/archive files are rsync'ed to another machine).

-AJ



--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

FAQ