this is probably a stupid question but after browsing the web I was not able to find out a clear solution:
I have a main backup server and an offsite one;
every night I make some backup to the offsite location (just the essential files I want to be able to recover even if an earthquake would destroy my main server).
I know that I should also backup in the offsite location the postgresql database (Catalog) and the bootstrap data (not really sure about this)...
the point is that I'm not able now to backup the catalog:
I was planning to rsync the dump of the database (using a pre-job script) to my offsite backup server.
unfortunately trying to dump it using bareos script make_catalog_backup.pl or simply pg_dump will return me these errors:
/usr/lib/bareos/scripts$ sudo ./make_catalog_backup.pl MyCatalog
pg_dump: [archiver (db)] connection to database "bareos" failed: FATAL: Peer authentication failed for user "bareos"
$ sudo pg_dump bareos
pg_dump: [archiver (db)] connection to database "bareos" failed: FATAL: role "root" does not exist
$ sudo pg_dump bareos -U bareos
pg_dump: [archiver (db)] connection to database "bareos" failed: FATAL: Peer authentication failed for user "bareos".
As you can see in my bareos-dir.conf file there is no password set or needed..
[...]
Catalog {
Name = MyCatalog
# Uncomment the following lines if you want the dbi driver
# dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =
#dbdriver = "postgresql"
dbdriver = "postgresql"
dbname = "bareos"
dbuser = "bareos"
dbpassword = ""
}
[...]
can somebody point me to the right direction??
>su - postgres
>/usr/lib/bareos/scripts/create_bareos_database
>/usr/lib/bareos/scripts/make_bareos_tables
>/usr/lib/bareos/scripts/grant_bareos_privileges
Let's hope it helps