#26 Problem when generating remote backup

1.x
closed
opensuse (2)
2015-01-31
2013-07-15
No

I have a problem! I am not knowing how to use the Barman
Performed the installation and configuration on a OpenSuse 12.2 with PostgreSQL 9.2 and 1.2.2 Barman.

I am attempting to generate a remote backup, server 192.168.30.237 (Barman) to 192.168.30.37 (PostgreSQL Master).
Problem:
- I can not find the backup compressed;
- Failed to perform the restore.
- Backups generated with 0kb

I know that the information is not accurate, but I would like some help from the experts.
Follows some information


barman@srv-backup:/sysmo/barman> barman list-server
main - Servidor Principal

barman@srv-backup:/sysmo/barman> barman check main
Server main:
ssh: OK
PostgreSQL: OK
archive_mode: OK
archive_command: OK
directories: OK
retention policy settings: OK
compression settings: OK
minimum redundancy requirements: OK (have 3 backups, expected at least 0)

barman@srv-backup:/sysmo/barman> barman status main
Server main:
description: Servidor Principal
PostgreSQL version: 9.2.3
PostgreSQL Data directory: /sysmo/sysmovs/dados/pgsql/data
archive_command: rsync -a %p barman@192.168.30.237:/sysmo/barman/test/%f
archive_status: last shipped WAL segment 000000010000000A000000A2
current_xlog: 000000010000000A000000A3
Retention policies: not enforced
No. of available backups: 3
first available backup: 20130710T151536
last available backup: 20130710T151737


barman@srv-backup:/sysmo/barman> barman show-server main
Server main:
active: true
description: Servidor Principal
ssh_command: ssh postgres@192.168.30.37
conninfo: host=192.168.30.37 user=postgres
backup_directory: /sysmo/barman/main
basebackups_directory: /sysmo/barman/main/base
wals_directory: /sysmo/barman/main/wals
incoming_wals_directory: /sysmo/barman/main/incoming
lock_file: /sysmo/barman/main/main.lock
compression: gzip
custom_compression_filter: None
custom_decompression_filter: None
retention_policy_mode: auto
retention_policy: None
wal_retention_policy: main
pre_backup_script: None
post_backup_script: None
minimum_redundancy: 0
bandwidth_limit: None
tablespace_bandwidth_limit: None
current_xlog: 000000010000000A000000A3
last_shipped_wal: 000000010000000A000000A2
archive_command: rsync -a %p barman@192.168.30.237:/sysmo/barman/test/%f
server_txt_version: 9.2.3
data_directory: /sysmo/sysmovs/dados/pgsql/data
archive_mode: on
config_file: /sysmo/sysmovs/dados/pgsql/data/postgresql.conf
hba_file: /sysmo/sysmovs/dados/pgsql/data/pg_hba.conf
ident_file: /sysmo/sysmovs/dados/pgsql/data/pg_ident.conf

When I run the backup have this information:

barman@srv-backup:/sysmo/barman> barman backup main
Starting backup for server main in /sysmo/barman/main/base/20130710T154050
Backup start at xlog location: A/A4000020 (000000010000000A000000A4, 00000020)
Copying files.
Copy done.
Asking PostgreSQL server to finalize the backup.
Backup end at xlog location: A/A40000E0 (000000010000000A000000A4, 000000E0)
Backup completed

Here we can see that the file size is zero ...

barman@srv-backup:/sysmo/barman> barman list-backup main
main 20130710T154050 - Wed Jul 10 15:40:57 2013 - Size: 0 B - WAL Size: 0 B
main 20130710T151737 - Wed Jul 10 15:19:08 2013 - Size: 0 B - WAL Size: 0 B
main 20130710T151644 - Wed Jul 10 15:16:51 2013 - Size: 0 B - WAL Size: 0 B
main 20130710T151536 - Wed Jul 10 15:15:43 2013 - Size: 0 B - WAL Size: 0 B

barman@srv-backup:/sysmo/barman> barman show-backup main 20130710T154050
Backup 20130710T154050:
Server Name : main
Status : DONE
PostgreSQL Version: 90203
PGDATA directory : /sysmo/sysmovs/dados/pgsql/data

Base backup information:

When I try to restore, of course, I get an error.

barman@srv-backup:/sysmo/barman> barman recover main 20130710T154050 /tmp/teste/
Starting local restore for server main using backup 20130710T154050
Destination directory: /tmp/teste/
Copying the base backup.
rsync: change_dir "/sysmo/barman/main/base/20130710T154050/pgdata" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
ERROR: Unhandled exception. See log file for more details.


Any idea what is my problem?

Related

Tickets: #13

Discussion

    • labels: --> opensuse
    • status: open --> accepted
    • assigned_to: Marco Nenciarini
     
  • Hi Eurides, at the moment Suse is not in the list of supported distributions. Are you interested in funding any work in that direction?

     
  • Hello Gabriele...

    At the moment I have no way to finance the implementation!

    But cloned the project and apply the fix. I am using with SUCCESSFULLY the resources of the Barman in OpenSuse 12.2 and PostgreSQL 9.2.
    https://sourceforge.net/u/euridesb/pgbarman/ci/3a17fe6dcca8b3aed40e16b15003bb757f2c3440/

    I found the problem in rsync ... If desired, you can execute a merge of sources
    Thanks for your code, I can't help otherwise...

     
    Last edit: Eurides Baptistella 2014-02-03
  • posaunenbaer
    posaunenbaer
    2014-05-13

    Hello All,
    I'm hitting the same issue on Suse Linux Enterprise 11 64bit (SP3) with PostgreSQL 9.3.4

    Backup can be started
    pg93@pgsql03:/opt/pg93/barman-backup/pg93_pgsql03> barman backup pg93_pgsql03
    Starting backup for server pg93_pgsql03 in /opt/pg93/barman-backup/pg93_pgsql03/base/20140513T132917
    Backup start at xlog location: 2/CE000028 (0000000100000002000000CE, 00000028)
    Copying files.
    Copy done.
    Asking PostgreSQL server to finalize the backup.
    Backup end at xlog location: 2/CE0000B8 (0000000100000002000000CE, 000000B8)
    Backup completed

    But directory for base backup stays empty (except the backup.info file)
    pg93@pgsql03:/opt/pg93/barman-backup/pg93_pgsql03> du -ms base/20140513T132917
    1 base/20140513T132917
    pg93@pgsql03:/opt/pg93/barman-backup/pg93_pgsql03> ls -la base/20140513T132917
    insgesamt 12
    drwxr-xr-x 2 pg93 pg93 4096 13. Mai 13:29 .
    drwxr-xr-x 5 pg93 pg93 4096 13. Mai 13:29 ..
    -rw-r--r-- 1 pg93 pg93 484 13. Mai 13:29 backup.info

     
  • Hi,

    actually the cause of this issue is a bug into a unofficial patch from Opensuse, that adds support for SLP.

    This patch broke the normal behavior of rsync, and that's why barman is not working with opensuse.

    I have discovered this bug thanks to a user in barman mailing list, and we have found that the solution for this issue, at the moment, is to remove Opensuse rsync and compile it from sources taken from rsync website, excluding opensuse patches.

    this is a link to the mailing list discussion:

    https://groups.google.com/forum/#!topic/pgbarman/sQEyau6zpTg

     
    • status: accepted --> closed