PDA

View Full Version : Amanda 3.1.2 and PostgresQL problem



Takayuki
October 26th, 2010, 06:26 AM
Hi there!

I just configured my Amanda 3.1.2 Server to backup local PostgresQL databases following this instruction (http://wiki.zmanda.com/index.php/How_To:Use_Amanda_to_Back_Up_PostgreSQL)and met some kind of problem. After running amcheck I saw the following error.


Amanda Backup Client Hosts Check
--------------------------------
ERROR: localhost: Get info from .backup file failed


It is seems to me like Amanda cannot read a file created by itself within the execution of the command
sudo -u amandabackup amcheck DailySet1

The only ".backup" files I found is located here...


# ls -la /var/lib/postgresql/8.3/main/pg_xlog/
...
000000010000000000000077.00000020.backup -rw------- 1 postgres postgres 16777216 Окт 26 18:23
...


So the permissions of them are owned by postgres user and group. Amanda can't read the newly created files, it's obvious. How can it be fixed? Or what am I doing wrong?..

Thanks for help!

P.S. My system is Debian Linux 5.04/AMD64, Amanda Server/Client 3.1.2 (built from Debian official package), PostgresQL 8.3 (also from packages repository).

bluethundr
January 6th, 2011, 02:38 PM
hello,

I actually ran into this problem earlier today which is how I turned up this thread. I think you'll find that the answer is that WAL logging in postgres is improperly configured.

Check the paths in your archive_command in /var/lib/pgsql/data/postgresql.conf file.

Make sure you get WAL working by following this guide:

http://www.postgresql.org/docs/current/static/continuous-archiving.html

Once you have successfully backed up up to the archive directory and can cd to that location and see that there are files there you can turn your attention back to Amanda configuration.

Then make sure you check the PG-DATADIR and PG-ARCHIVEDIR values that you have set in /etc/amanda/amanda-client.conf on the client side are correct. Once you're sure that there aren't any type-o's in the paths you have set for those values make sure that

1) the amandabackup user is part of the postgres group
2) that the modes on /var/lib/pgsql/archive are set to 750


Assuming that your disklist is correct, once you have done the above go back to the amanda server and then run amcheck YOURCONFIG once again and see if that clears up any errors you may be experiencing.

Best of luck!