PostgreSQL + why archive_command line is marked after barman restore

backupbarmanlinuxpostgresqlrestore

I use the barman tool as backup & restore for PostgreSQL

after I restored successfully the data folder under /var/lib/pgsql by the barman

we have seen that the line with archive_command was remarked by the #BARMAN# and the line – archive_command = false added also

as the following

vi /var/lib/pgsql/data/postgresql.conf

#BARMAN# archive_command = 'rsync -a %p barman@107.14.23.6:/var/lib/barman/main-db-server/incoming/%f'
archive_command = false

this mean from this point we can't backup the data folder from the backup server
because line is marked

why barman remark the line after restore process?

can we avoid this? ( because this stops the backup process each night )

  • IP – 107.14.23.6 is the backup server

Best Answer

As far as barman knows, you did the restore in order to make a clone of your instance and the original instance is still running someplace. You definitely don't want two instances sending WAL to the same archive. If you are dead certain the original instance has been irreversibly destroyed, then you should turn archiving back on. Otherwise, you should start archiving to a different location.