0

I am trying to use incremental backup provided by postgres. It is working if I copy the WAL files as it is in another folder and then recover. But if I make .tar.gz of WAL file then try to recover db it is not starting server.

    archive command = 'gzip -c %p > /var/lib/postgresql/pg_log_archive/%f.gz'
    restore_command = 'gunzip < /var/lib/postgresql/pg_log_archive/%f.gz > %p'

Server start gives error displayed below:

Job for postgresql@9.6-main.service failed because the service did not take the steps required by its unit configuration.

See "systemctl status postgresql@9.6-main.service" and "journalctl -xe" for details.

journalctl -xe command shows following o/p

AVC apparmor="DENIED" operation="open" profile="snap.gnome-calculator.gnome-calculator" name="/home/charmi/Documents/" pid=13351 c
kernel: audit: type=1400 audit(1581410048.862:109): apparmor="DENIED" operation="open" profile="snap.gnome-calculator.gnome-calculator" name="/h
kernel: audit: type=1400 audit(1581410048.866:110): apparmor="DENIED" operation="open" profile="snap.gnome-calculator.gnome-calculator" name="/h
kernel: audit: type=1400 audit(1581410048.866:111): apparmor="DENIED" operation="open" profile="snap.gnome-calculator.gnome-calculator" 

I also tried to unzip WAL files stored in folder pg_log_archive. and then tried to restart postgresql server but it also fails. Any help is appreciated. Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.