Thread: backup script
GM, First where can I post my question on the forum? Couldn't find the forum for discussion. Second, I'm new with postgres. Try to evaluate this new db software before the company can switch all oracle and mysql to postgres. I don't understand the concept how to create backup user, tablespace, etc.... Where can I create those from? Do I need to go to template1 and create them? This software has no much help online and confused me... please help Thanks, Bach-Nga Catherine Vo 703-767-7009 mailto: bvo.ctr@dtic.mil
On 11/05/2012 16:23, Vo, Catherine CTR DTIC Z wrote: > GM, > > First where can I post my question on the forum? Couldn't find the > forum for discussion. Hi there, Not sure what forum you mean.... you're writing to the pgsql-general mailing list, so you're already in the right place. > Second, I'm new with postgres. Try to evaluate this new db software > before the company can switch all oracle and mysql to postgres. I don't > understand the concept how to create backup user, tablespace, etc.... Welcome! Some of this happens in the database, some in the operating system. If you give details of your platform - hardware and software - people will be able to help you. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
We are using Sun Solaris 64bits version 10. postgresql-9.1.3-S10.sparc-6 I downloaded the script from some of the website and try to test out but didn't work at all. Don't know how to create a backup user (I know the syntax but where should I create it?) Normall, we goes to sqlplus / as sysdba on oracle and mysql -u root -p on mysql, but where should I create it on postgres? Also, when I start the postgres, I saw 5 processes running... this is odd isn't it? Beside that, don't see port running on /tmp directory. Thanks, Bach-Nga Catherine Vo 703-767-7009 mailto: bvo.ctr@dtic.mil -----Original Message----- From: Raymond O'Donnell [mailto:rod@iol.ie] Sent: Friday, May 11, 2012 12:35 PM To: Vo, Catherine CTR DTIC Z Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] backup script On 11/05/2012 16:23, Vo, Catherine CTR DTIC Z wrote: > GM, > > First where can I post my question on the forum? Couldn't find the > forum for discussion. Hi there, Not sure what forum you mean.... you're writing to the pgsql-general mailing list, so you're already in the right place. > Second, I'm new with postgres. Try to evaluate this new db software > before the company can switch all oracle and mysql to postgres. I > don't understand the concept how to create backup user, tablespace, etc.... Welcome! Some of this happens in the database, some in the operating system. If you give details of your platform - hardware and software - people will be able to help you. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
Hi Am 11.05.2012 21:38, schrieb Vo, Catherine CTR DTIC Z: > We are using Sun Solaris 64bits version 10. > postgresql-9.1.3-S10.sparc-6 > > Don't know how to create a backup user (I know the > syntax but where should I create it?) I don't know Solaris, but with the installation of Postgres on Linux there usually comes a user "postgres". That user is by default a superuser on the primary database called "postgres" and can connect to it without a password. So you could use that default superuser - or better create a new user for backups: http://www.postgresql.org/docs/9.1/static/sql-createuser.html http://www.postgresql.org/docs/9.1/static/app-createuser.html > Normall, we goes to sqlplus / as > sysdba on oracle and mysql -u root -p on mysql, but where should I > create it on postgres? > > Also, when I start the postgres, I saw 5 processes running... this is > odd isn't it? Beside that, don't see port running on /tmp directory. > > Thanks, > > > Bach-Nga Catherine Vo > 703-767-7009 > mailto: bvo.ctr@dtic.mil > > > -----Original Message----- > From: Raymond O'Donnell [mailto:rod@iol.ie] > Sent: Friday, May 11, 2012 12:35 PM > To: Vo, Catherine CTR DTIC Z > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] backup script > > On 11/05/2012 16:23, Vo, Catherine CTR DTIC Z wrote: >> GM, >> >> First where can I post my question on the forum? Couldn't find the >> forum for discussion. > Hi there, > > Not sure what forum you mean.... you're writing to the pgsql-general > mailing list, so you're already in the right place. > >> Second, I'm new with postgres. Try to evaluate this new db software >> before the company can switch all oracle and mysql to postgres. I >> don't understand the concept how to create backup user, tablespace, > etc.... > > Welcome! > > Some of this happens in the database, some in the operating system. If > you give details of your platform - hardware and software - people will > be able to help you. > > Ray. > > -- > Raymond O'Donnell :: Galway :: Ireland > rod@iol.ie > -- wikisquare Softwareentwicklung Stefan Tzeggai Straßburger Weg 26 53113 Bonn email tzeggai@wikisquare.de webpage wikisquare.de skype alfonx phone 0228 24 000 528 mobile 0176 40 38 9559 reclaim your net - http://tor.eff.org enforce privacy - http://www.pgpi.org pgp key id: 51B576FD - http://pgp.mit.edu Please note that according to the German law on data retention, information on every electronic information exchange with me is retained for a period of six months.
On 05/11/2012 12:38 PM, Vo, Catherine CTR DTIC Z wrote: > We are using Sun Solaris 64bits version 10. > postgresql-9.1.3-S10.sparc-6 > > I downloaded the script from some of the website and try to test out but > didn't work at all. Don't know how to create a backup user (I know the > syntax but where should I create it?) Normall, we goes to sqlplus / as > sysdba on oracle and mysql -u root -p on mysql, but where should I > create it on postgres? The answer (as always) is, "it depends". I'll try to get you pointed in the right direction. The tools you need are called pg_dump and/or pg_dumpall: http://www.postgresql.org/docs/current/static/app-pgdump.html http://www.postgresql.org/docs/current/static/app-pg-dumpall.html The tools connect to the database pretty much like any other PostgreSQL client connects (user/password/dbname/etc.) and must have permissions appropriate to access the data being dumped. This does not necessarily need to be a superuser. If Pat owns his/her database and wants to dump it s/he can. To dump everything in the database cluster (user/role information, all databases, ...) requires superuser privilege. The PostgreSQL superuser is "postgres". For any connection to the database, whether general user or for doing dumps, you need to make sure the connection is allowed in pg_hba.conf: http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html > Also, when I start the postgres, I saw 5 processes running... this is > odd isn't it? Not odd at all. There is a main process listening for connections plus several helper processes doing things like managing statistics collection, managing database vacuuming (maintenance including dead-space reclamation through autovacuum) and so on. There will also be a process for every connected user. > Beside that, don't see port running on /tmp directory. > That is a default but can be changed a build-time or through configuration: http://www.postgresql.org/docs/current/static/runtime-config-connection.html If your database is running and you can connect, try: show unix_socket_directory; Cheers, Steve
Hi, So exactly what do I need to do here? I don't understand how the backup script work and what exactly user do I need to create? Can you please tell me more in detail? Thanks, Bach-Nga Catherine Vo 703-767-7009 mailto: bvo.ctr@dtic.mil -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Stefan Tzeggai Sent: Friday, May 11, 2012 4:37 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] backup script Hi Am 11.05.2012 21:38, schrieb Vo, Catherine CTR DTIC Z: > We are using Sun Solaris 64bits version 10. > postgresql-9.1.3-S10.sparc-6 > > Don't know how to create a backup user (I know the syntax but where > should I create it?) I don't know Solaris, but with the installation of Postgres on Linux there usually comes a user "postgres". That user isby default a superuser on the primary database called "postgres" and can connect to it without a password. So you could use that default superuser - or better create a new user for backups: http://www.postgresql.org/docs/9.1/static/sql-createuser.html http://www.postgresql.org/docs/9.1/static/app-createuser.html > Normall, we goes to sqlplus / as > sysdba on oracle and mysql -u root -p on mysql, but where should I > create it on postgres? > > Also, when I start the postgres, I saw 5 processes running... this is > odd isn't it? Beside that, don't see port running on /tmp directory. > > Thanks, > > > Bach-Nga Catherine Vo > 703-767-7009 > mailto: bvo.ctr@dtic.mil > > > -----Original Message----- > From: Raymond O'Donnell [mailto:rod@iol.ie] > Sent: Friday, May 11, 2012 12:35 PM > To: Vo, Catherine CTR DTIC Z > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] backup script > > On 11/05/2012 16:23, Vo, Catherine CTR DTIC Z wrote: >> GM, >> >> First where can I post my question on the forum? Couldn't find the >> forum for discussion. > Hi there, > > Not sure what forum you mean.... you're writing to the pgsql-general > mailing list, so you're already in the right place. > >> Second, I'm new with postgres. Try to evaluate this new db software >> before the company can switch all oracle and mysql to postgres. I >> don't understand the concept how to create backup user, tablespace, > etc.... > > Welcome! > > Some of this happens in the database, some in the operating system. If > you give details of your platform - hardware and software - people > will be able to help you. > > Ray. > > -- > Raymond O'Donnell :: Galway :: Ireland rod@iol.ie > -- wikisquare Softwareentwicklung Stefan Tzeggai Straßburger Weg 26 53113 Bonn email tzeggai@wikisquare.de webpage wikisquare.de skype alfonx phone 0228 24 000 528 mobile 0176 40 38 9559 reclaim your net - http://tor.eff.org enforce privacy - http://www.pgpi.org pgp key id: 51B576FD - http://pgp.mit.edu Please note that according to the German law on data retention, information on every electronic information exchange withme is retained for a period of six months. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general