Re: ampgsql - some questions
On 05/06/2013 03:16 PM, Kamil Jońca wrote: I tried to use ampgsql to backup mu personal database cluster (over a dozen GBs) finally I think, I did it, but there is some ambiguity for me. I used http://wiki.zmanda.com/man/ampgsql.8.html http://wiki.zmanda.com/index.php/How_To:Use_Amanda_to_Back_Up_PostgreSQL as a reference. (I used debian's 1:3.3.3-1 version) My first config (excerpts) [...] amanda.conf --8---cut here---start-8--- define dumptype gnutar { program GNUTAR } define dumptype gnutar-local { gnutar auth local } define application-tool app-ampgsql { comment ampgsql plugin ampgsql property ARCHIVEDIR /var/lib/postgresql/archive property TMPDIR /tmp/ampgsql property DIRECTORY /tmp/amanda-pgsql/ property HOST /var/run/postgresql/ property USER backup } define dumptype ampgsql-local { gnutar-local # You might need this if you're setting 'auth bsdtcp' in your global dumptype settings, for example program APPLICATION application app-ampgsql property PG-ARCHIVEDIR /var/lib/postgresql/archive property PG-DATADIR /var/lib/postgresql/9.1/main } --8---cut here---end---8--- This create two properties of the dumptype, you want application properties: It is a bug to use the 'PG-' prefix on the application properties. The 'PG-' prefix must be use only if you define the properties in amanda-client.conf, don't do it, it is deprecated. define dumptype ampgsql-local { gnutar-local # You might need this if you're setting 'auth bsdtcp' in your global dumptype settings, for example program APPLICATION application { app-ampgsql property ARCHIVEDIR /var/lib/postgresql/archive # not required, it is set in app-ampgsql property DATADIR /var/lib/postgresql/9.1/main# you could set it in app-ampgsql } } disklist --8---cut here---start-8--- localhost postgres ampgsql-local --8---cut here---end---8--- (example from howto was foo.example.com bar dt_ampgsql) But this did not work :( After read some debug and log files I found that tar called from ampgsql tries to backup postrgresql dir which was clearly wrong. then I changed disklist to --8---cut here---start-8--- localhost postgres /var/lib/postgresql/9.1/main ampgsql-local --8---cut here---end---8--- And this seems to work. (At least dump contents looks reasonable) But 1. Am I misssed something about cluster data dir in dikslist? 2. If I have to use diskdevice in disklist entry - what for is PG-DATADIR? Either the diskdevice in disklist or the DATADIR application property. Jean-Louis
Re: ampgsql - some questions
Jean-Louis Martineau martin...@zmanda.com writes: [...] This create two properties of the dumptype, you want application properties: It is a bug to use the 'PG-' prefix on the application properties. The 'PG-' prefix must be use only if you define the properties in amanda-client.conf, don't do it, it is deprecated. Yes, I know it's deprecated (as written http://wiki.zmanda.com/man/ampgsql.8.html), but I think, that manual is not clear here about PG- prefix, moreover I can't see DATADIR property for application. [...] define dumptype ampgsql-local { gnutar-local # You might need this if you're setting 'auth bsdtcp' in your global dumptype settings, for example program APPLICATION application { app-ampgsql property ARCHIVEDIR /var/lib/postgresql/archive # not required, it is set in app-ampgsql property DATADIR /var/lib/postgresql/9.1/main# you could set it in app-ampgsql } } Either the diskdevice in disklist or the DATADIR application property. Thanks for your reply. BTW. I thought, that application parameter can accept only name of previously defined application. --8---cut here---start-8--- define dumptype ampgsql-local { program APPLICATION application { app-ampgsql property ARCHIVEDIR /var/lib/postgresql/archive # not required, it is set in app-ampgsql property DATADIR /var/lib/postgresql/9.1/main# you could set it in app-ampgsql } } --8---cut here---end---8--- KJ -- http://blogdebart.pl/2012/06/24/hiena/ I have an existential map. It has You are here written all over it. -- Steven Wright
Re: ampgsql - some questions
On 05/07/2013 08:47 AM, Kamil Jońca wrote: Yes, I know it's deprecated (as written http://wiki.zmanda.com/man/ampgsql.8.html), but I think, that manual is not clear here about PG- prefix, moreover I can't see DATADIR property for application. You are right, there is no DATADIR application property, you must set the diskdevice in disklist. Jean-Louis
ampgsql - some questions
I tried to use ampgsql to backup mu personal database cluster (over a dozen GBs) finally I think, I did it, but there is some ambiguity for me. I used http://wiki.zmanda.com/man/ampgsql.8.html http://wiki.zmanda.com/index.php/How_To:Use_Amanda_to_Back_Up_PostgreSQL as a reference. (I used debian's 1:3.3.3-1 version) My first config (excerpts) [...] amanda.conf --8---cut here---start-8--- define dumptype gnutar { program GNUTAR } define dumptype gnutar-local { gnutar auth local } define application-tool app-ampgsql { comment ampgsql plugin ampgsql property ARCHIVEDIR /var/lib/postgresql/archive property TMPDIR /tmp/ampgsql property DIRECTORY /tmp/amanda-pgsql/ property HOST /var/run/postgresql/ property USER backup } define dumptype ampgsql-local { gnutar-local # You might need this if you're setting 'auth bsdtcp' in your global dumptype settings, for example program APPLICATION application app-ampgsql property PG-ARCHIVEDIR /var/lib/postgresql/archive property PG-DATADIR /var/lib/postgresql/9.1/main } --8---cut here---end---8--- disklist --8---cut here---start-8--- localhost postgres ampgsql-local --8---cut here---end---8--- (example from howto was foo.example.com bar dt_ampgsql) But this did not work :( After read some debug and log files I found that tar called from ampgsql tries to backup postrgresql dir which was clearly wrong. then I changed disklist to --8---cut here---start-8--- localhost postgres /var/lib/postgresql/9.1/main ampgsql-local --8---cut here---end---8--- And this seems to work. (At least dump contents looks reasonable) But 1. Am I misssed something about cluster data dir in dikslist? 2. If I have to use diskdevice in disklist entry - what for is PG-DATADIR? KJ -- http://blogdebart.pl/2010/03/17/dalsze-przygody-swinki-w-new-jersey/ World War Three can be averted by adherence to a strictly enforced dress code!