I have this line in the file /var/lib/pgsql/data/postgresql.conf
:
# archive_command = '' # command to use to archive a logfile segment
we need to uncomment the archive_command
parameter, and set its value to
'rsync -a %p barman@barman-backup-server-ip:/var/lib/barman/main-db-server/incoming/%f'
so the expected results will be
archive_command = 'rsync -a %p barman@barman-backup-server-ip:/var/lib/barman/main-db-server/incoming/%f'
How to perform this by sed or perl one line liner?
other option is just add the line:
archive_command = 'rsync -a %p barman@barman-backup-server-ip:/var/lib/barman/main-db-server/incoming/%f'
after the line:
#archive_command = ''