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!

Reply via email to