Problem backup Postgresql

Here you can write your Problems with Backups.

Moderator: sepma

Post Reply
juliusg
Posts: 9
Joined: November 15th, 2016, 12:12 pm
Spam Stop: No
SEP sesam: Software

Problem backup Postgresql

Post by juliusg » November 30th, 2016, 11:30 am

I installed PostgreSQL in my Linux system using RHEL 7 as a client. I have configured the communication between the SEP sesam Backup Server and the client. I have tested immediate start full path backup from the client and it succeed. But when I try to immediate start full backup PostgreSQL, it did not make it and shows up the error message below:

Automatic backup <backup_name> completed
Error: Saveset zero size!

Please help what's wrong with the error? Is there anything I should do before doing the PostgreSQL backup?

Thank you.

jgb
Posts: 55
Joined: June 27th, 2011, 11:11 am
Spam Stop: No
SEP sesam: Software

Re: Problem backup Postgresql

Post by jgb » November 30th, 2016, 6:16 pm

Hi,

normally this means, that the saved size is zero, for instance if you haven't create a database or have'nt any content within your database.

You can set the loglevel of the backup task to a higher level, insert in the field "save options" within the task configuration (tab: options) the value "-v 1" or "-v 2" ( without " ). In the backup log you can see whats happend.

JGB

juliusg
Posts: 9
Joined: November 15th, 2016, 12:12 pm
Spam Stop: No
SEP sesam: Software

Re: Problem backup Postgresql

Post by juliusg » December 1st, 2016, 4:14 am

jgb wrote:Hi,

normally this means, that the saved size is zero, for instance if you haven't create a database or have'nt any content within your database.

You can set the loglevel of the backup task to a higher level, insert in the field "save options" within the task configuration (tab: options) the value "-v 1" or "-v 2" ( without " ). In the backup log you can see whats happend.

JGB
Hi JGB,

Thank you again for your response. I already did the instruction you mentioned above. But it still showing the same error message.

Actually the database I already made is just an example database (not actual database). It only contain 2 database with 1 table each database and 2-3 rows for each table. Is it because my example database too tiny in size?

Thank you.

*edited

Hi JGB,

I think I know the problem. Maybe I should insert the user privilege to my SEP sesam Backup Server of my database. I already fill the account and password of my database at postgresql tab at backup task. I saw the tutorial video about how to backup MySQL database and the list of databases supposed to be appear right at the path. But it didn't show up at mine.

I've already configured the access of my database to the SEP sesam Backup Server computer. I've also already tested to remote my database using Navicat through the SEP sesam Backup Server computer and my databases show up in Navicat. But it didn't show up using SEP sesam Backup Server.

Is there anything should I configure to get the access to my database using SEP sesam Backup Server?

Thank you.

jgb
Posts: 55
Joined: June 27th, 2011, 11:11 am
Spam Stop: No
SEP sesam: Software

Re: Problem backup Postgresql

Post by jgb » December 1st, 2016, 10:44 am

Hi,

I've tried to reproduce the problem, but if I use the right user for backup it works.

1) create a new Login Role (sepsesam) with rights to testdb and a new database (testdb)
2) insert in backup task configuration tab "options" -a user=sepsesam,port=11201
http://wiki.sep.de/wiki/index.php/SEP_s ... PostgreSQL

In my case I use my sesam server, so the db is listening on port 11201 . I have started the backup also on command line on DB server.

[root@sinus ~]# /opt/sesam/bin/sesam/sbc_pgsql -b -l copy -s @/dev/null -v 1 -a user=sepsesam,port=11201 testdb
2016-12-01 10:25:37: spg-3200: Info: @(#)SESAM BACKUP CLIENT PostgreSQL, VERSION A 1 Build: $Id: a73e908 (HEAD, tag: v4_4_3_build, origin/v4_4_3, v4_4_3) 2016-11-24 11:58:55 +0100 rev:43871
2016-12-01 10:25:37: spg-3500: Info: Restart with sbc
2016-12-01 10:25:37: spg-3500: Info: /opt/sesam/bin/sesam/sbc -b -F none -f @@/opt/sesam/bin/sesam/sbc_pgsql -l copy -s @/dev/null -v 1 -a user=sepsesam,port=11201 testdb
2016-12-01 10:25:37: sbc-3003: Info: Opening saveset: /dev/null
2016-12-01 10:25:37: sbc-3500: Info: Skip further arguments, e.g. [testdb] bcs. source file names are given via pipe
2016-12-01 10:25:37: sbc-3036: Info: # @(#)SESAM BACKUP CLIENT FOR UNIX FILE SYSTEMS, VERSION: 4.4R3 Build: a73e908 20161124 12:27:41 Linux x86_64 rhel664fix #
2016-12-01 10:25:37: sbc-3019: Info: OS info: Fedora release 19 (Schrödinger’s Cat)
2016-12-01 10:25:37: sbc-3550: Info: OpenSSL Version: : OpenSSL 1.0.2e (build: OpenSSL 1.0.2e)
2016-12-01 10:25:37: sbc-3550: Info: cURL Version: : 7.46.0
2016-12-01 10:25:37: sbc-3550: Info: cURL OpenSSL Version: : OpenSSL/1.0.2e
2016-12-01 10:25:37: sbc-3063: Info: -------------------- Operation Parameters --------------------
2016-12-01 10:25:37: sbc-3100: Info: Program PID: 32755
2016-12-01 10:25:37: sbc-3030: Info: Operation: BACKUP, Level: COPY
2016-12-01 10:25:37: sbc-3002: Info: Building file list from: ["/opt/sesam/bin/sesam/sbc" "-b" "-F" "none" "-f" "@@/opt/sesam/bin/sesam/sbc_pgsql" "-l" "copy" "-s" "@/dev/null" "-v" "1" "-a" "user=sepsesam,port=11201" "testdb" ]
2016-12-01 10:25:37: sbc-3162: Info: Client Host name: sinus
2016-12-01 10:25:37: sbc-3500: Info: Buffer size for I/O operations is [1048576]
2016-12-01 10:25:37: sbc-3031: Info: Storage Host: localhost:11001,0-0::
2016-12-01 10:25:37: sbc-3032: Info: Control Host: localhost:11001::
2016-12-01 10:25:37: sbc-3033: Info: Device: .::SHARE:0
2016-12-01 10:25:37: sbc-3207: Info: sbc: Found libacl.so -> implicitly switching to acl mode.
2016-12-01 10:25:37: sbc-3034: Info: Saveset Target: @/dev/null
2016-12-01 10:25:37: sbc-3064: Info: --------------------- Operation Messages ---------------------
2016-12-01 10:25:37: sbc-3025: Info: Got 7 exclude patterns from SM.INI [SBC_EXCLUDE] ExcludePattern...
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./opt/novell/nss/mnt/\.pools$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./run/media$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./\.snapshots$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [/lost+found$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./dev$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./media$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./mnt$]
2016-12-01 10:25:37: sbc-3027: Info: Got 4 ignore patterns from SM.INI [SBC_IGNORE_SIZE_CHANGE] IgnorePattern...
2016-12-01 10:25:37: sbc-3028: Info: Ignore pattern [\./var/opt/sesam/var/.*]
2016-12-01 10:25:37: sbc-3028: Info: Ignore pattern [\./var/log/.*]
2016-12-01 10:25:37: sbc-3028: Info: Ignore pattern [.*/sms/.*]
2016-12-01 10:25:37: sbc-3028: Info: Ignore pattern [.*/lgc/.*]
2016-12-01 10:25:37: sbc-3002: Info: Building file list from: [/opt/sesam/bin/sesam/sbc_pgsql /opt/sesam/bin/sesam/sbc -b -F none -l copy -s @/dev/null -v 1 -a user=sepsesam,port=11201 testdb]
2016-12-01 10:25:37: sbc-3500: Info: Read from pipe /opt/sesam/bin/sesam/sbc_pgsql
2016-12-01 10:25:37: sbc-3004: Info: Begin writing to saveset...
2016-12-01 10:25:37: sbc-3074: Info: Backup start time [20161201102537]
2016-12-01 10:25:37: spg-3200: Info: @(#)SESAM BACKUP CLIENT PostgreSQL, VERSION A 1 Build: $Id: a73e908 (HEAD, tag: v4_4_3_build, origin/v4_4_3, v4_4_3) 2016-11-24 11:58:55 +0100 rev:43871
2016-12-01 10:25:37: spg-3200: Info: Database options:
2016-12-01 10:25:37: spg-3200: Info: SBC options:
2016-12-01 10:25:37: spg-3200: Info: Mode: backup online
2016-12-01 10:25:37: spg-3200: Info: Show all database(s) found:
2016-12-01 10:25:37: spg-3500: Info: Liste der Datenbanken
2016-12-01 10:25:37: spg-3500: Info: Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | Zugriffsprivilegien
2016-12-01 10:25:37: spg-3500: Info: -----------+------------+-----------+--------------+------------+---------------------
2016-12-01 10:25:37: spg-3500: Info: postgres | sesam | UTF8 | C | C |
2016-12-01 10:25:37: spg-3500: Info: sesam_db | root | UTF8 | C | C |
2016-12-01 10:25:37: spg-3500: Info: template0 | sesam | UTF8 | C | C | =c/sesam +
2016-12-01 10:25:37: spg-3500: Info: | | | | | sesam=CTc/sesam
2016-12-01 10:25:37: spg-3500: Info: template1 | sesam | UTF8 | C | C | =c/sesam +
2016-12-01 10:25:37: spg-3500: Info: | | | | | sesam=CTc/sesam
2016-12-01 10:25:37: spg-3500: Info: testdb | root | UTF8 | C | C |
2016-12-01 10:25:37: spg-3500: Info: (5 Zeilen)
2016-12-01 10:25:37: spg-3500: Info:
2016-12-01 10:25:37: spg-3500: Info:
2016-12-01 10:25:37: spg-3200: Info: Backup command: pg_dump --format=custom --user=sepsesam --port=11201 testdb
2016-12-01 10:25:37: spg-3085: Info: -------------------- begin of DB output -------------------
2016-12-01 10:25:37: spg-3200: Info: -------------------- end of DB output -------------------
2016-12-01 10:25:37: spg-3200: Info: Status of DB command: 0
2016-12-01 10:25:37: spg-3007: Info: Operation successful
2016-12-01 10:25:37: spg-3001: Info: Exiting.
2016-12-01 10:25:37: sbc-3108: Info: Item processed successfully: [/opt/sesam/bin/sesam/sbc_pgsql]
2016-12-01 10:25:37: sbc-3006: Info: Saveset size: 2333 bytes. Throughput: 8.009720 MB/Hour. (@/dev/null)
2016-12-01 10:25:37: sbc-3005: Info: Closing saveset.
2016-12-01 10:25:37: sbc-3310: Info: Checksum (adler32): 2281805905. (@/dev/null)
2016-12-01 10:25:37: sbc-3052: Info: Items processed correctly: [2]. Not processed or incorrectly processed items: [0]. (@/dev/null)
2016-12-01 10:25:37: sbc-3007: Info: Operation successful.
2016-12-01 10:25:37: sbc-3001: Info: Exiting.
[root@sinus ~]#

juliusg
Posts: 9
Joined: November 15th, 2016, 12:12 pm
Spam Stop: No
SEP sesam: Software

Re: Problem backup Postgresql

Post by juliusg » December 2nd, 2016, 8:39 am

jgb wrote:Hi,

I've tried to reproduce the problem, but if I use the right user for backup it works.

1) create a new Login Role (sepsesam) with rights to testdb and a new database (testdb)
2) insert in backup task configuration tab "options" -a user=sepsesam,port=11201
http://wiki.sep.de/wiki/index.php/SEP_s ... PostgreSQL

In my case I use my sesam server, so the db is listening on port 11201 . I have started the backup also on command line on DB server.

[root@sinus ~]# /opt/sesam/bin/sesam/sbc_pgsql -b -l copy -s @/dev/null -v 1 -a user=sepsesam,port=11201 testdb
2016-12-01 10:25:37: spg-3200: Info: @(#)SESAM BACKUP CLIENT PostgreSQL, VERSION A 1 Build: $Id: a73e908 (HEAD, tag: v4_4_3_build, origin/v4_4_3, v4_4_3) 2016-11-24 11:58:55 +0100 rev:43871
2016-12-01 10:25:37: spg-3500: Info: Restart with sbc
2016-12-01 10:25:37: spg-3500: Info: /opt/sesam/bin/sesam/sbc -b -F none -f @@/opt/sesam/bin/sesam/sbc_pgsql -l copy -s @/dev/null -v 1 -a user=sepsesam,port=11201 testdb
2016-12-01 10:25:37: sbc-3003: Info: Opening saveset: /dev/null
2016-12-01 10:25:37: sbc-3500: Info: Skip further arguments, e.g. [testdb] bcs. source file names are given via pipe
2016-12-01 10:25:37: sbc-3036: Info: # @(#)SESAM BACKUP CLIENT FOR UNIX FILE SYSTEMS, VERSION: 4.4R3 Build: a73e908 20161124 12:27:41 Linux x86_64 rhel664fix #
2016-12-01 10:25:37: sbc-3019: Info: OS info: Fedora release 19 (Schrödinger’s Cat)
2016-12-01 10:25:37: sbc-3550: Info: OpenSSL Version: : OpenSSL 1.0.2e (build: OpenSSL 1.0.2e)
2016-12-01 10:25:37: sbc-3550: Info: cURL Version: : 7.46.0
2016-12-01 10:25:37: sbc-3550: Info: cURL OpenSSL Version: : OpenSSL/1.0.2e
2016-12-01 10:25:37: sbc-3063: Info: -------------------- Operation Parameters --------------------
2016-12-01 10:25:37: sbc-3100: Info: Program PID: 32755
2016-12-01 10:25:37: sbc-3030: Info: Operation: BACKUP, Level: COPY
2016-12-01 10:25:37: sbc-3002: Info: Building file list from: ["/opt/sesam/bin/sesam/sbc" "-b" "-F" "none" "-f" "@@/opt/sesam/bin/sesam/sbc_pgsql" "-l" "copy" "-s" "@/dev/null" "-v" "1" "-a" "user=sepsesam,port=11201" "testdb" ]
2016-12-01 10:25:37: sbc-3162: Info: Client Host name: sinus
2016-12-01 10:25:37: sbc-3500: Info: Buffer size for I/O operations is [1048576]
2016-12-01 10:25:37: sbc-3031: Info: Storage Host: localhost:11001,0-0::
2016-12-01 10:25:37: sbc-3032: Info: Control Host: localhost:11001::
2016-12-01 10:25:37: sbc-3033: Info: Device: .::SHARE:0
2016-12-01 10:25:37: sbc-3207: Info: sbc: Found libacl.so -> implicitly switching to acl mode.
2016-12-01 10:25:37: sbc-3034: Info: Saveset Target: @/dev/null
2016-12-01 10:25:37: sbc-3064: Info: --------------------- Operation Messages ---------------------
2016-12-01 10:25:37: sbc-3025: Info: Got 7 exclude patterns from SM.INI [SBC_EXCLUDE] ExcludePattern...
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./opt/novell/nss/mnt/\.pools$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./run/media$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./\.snapshots$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [/lost+found$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./dev$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./media$]
2016-12-01 10:25:37: sbc-3026: Info: Exclude pattern [\./mnt$]
2016-12-01 10:25:37: sbc-3027: Info: Got 4 ignore patterns from SM.INI [SBC_IGNORE_SIZE_CHANGE] IgnorePattern...
2016-12-01 10:25:37: sbc-3028: Info: Ignore pattern [\./var/opt/sesam/var/.*]
2016-12-01 10:25:37: sbc-3028: Info: Ignore pattern [\./var/log/.*]
2016-12-01 10:25:37: sbc-3028: Info: Ignore pattern [.*/sms/.*]
2016-12-01 10:25:37: sbc-3028: Info: Ignore pattern [.*/lgc/.*]
2016-12-01 10:25:37: sbc-3002: Info: Building file list from: [/opt/sesam/bin/sesam/sbc_pgsql /opt/sesam/bin/sesam/sbc -b -F none -l copy -s @/dev/null -v 1 -a user=sepsesam,port=11201 testdb]
2016-12-01 10:25:37: sbc-3500: Info: Read from pipe /opt/sesam/bin/sesam/sbc_pgsql
2016-12-01 10:25:37: sbc-3004: Info: Begin writing to saveset...
2016-12-01 10:25:37: sbc-3074: Info: Backup start time [20161201102537]
2016-12-01 10:25:37: spg-3200: Info: @(#)SESAM BACKUP CLIENT PostgreSQL, VERSION A 1 Build: $Id: a73e908 (HEAD, tag: v4_4_3_build, origin/v4_4_3, v4_4_3) 2016-11-24 11:58:55 +0100 rev:43871
2016-12-01 10:25:37: spg-3200: Info: Database options:
2016-12-01 10:25:37: spg-3200: Info: SBC options:
2016-12-01 10:25:37: spg-3200: Info: Mode: backup online
2016-12-01 10:25:37: spg-3200: Info: Show all database(s) found:
2016-12-01 10:25:37: spg-3500: Info: Liste der Datenbanken
2016-12-01 10:25:37: spg-3500: Info: Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | Zugriffsprivilegien
2016-12-01 10:25:37: spg-3500: Info: -----------+------------+-----------+--------------+------------+---------------------
2016-12-01 10:25:37: spg-3500: Info: postgres | sesam | UTF8 | C | C |
2016-12-01 10:25:37: spg-3500: Info: sesam_db | root | UTF8 | C | C |
2016-12-01 10:25:37: spg-3500: Info: template0 | sesam | UTF8 | C | C | =c/sesam +
2016-12-01 10:25:37: spg-3500: Info: | | | | | sesam=CTc/sesam
2016-12-01 10:25:37: spg-3500: Info: template1 | sesam | UTF8 | C | C | =c/sesam +
2016-12-01 10:25:37: spg-3500: Info: | | | | | sesam=CTc/sesam
2016-12-01 10:25:37: spg-3500: Info: testdb | root | UTF8 | C | C |
2016-12-01 10:25:37: spg-3500: Info: (5 Zeilen)
2016-12-01 10:25:37: spg-3500: Info:
2016-12-01 10:25:37: spg-3500: Info:
2016-12-01 10:25:37: spg-3200: Info: Backup command: pg_dump --format=custom --user=sepsesam --port=11201 testdb
2016-12-01 10:25:37: spg-3085: Info: -------------------- begin of DB output -------------------
2016-12-01 10:25:37: spg-3200: Info: -------------------- end of DB output -------------------
2016-12-01 10:25:37: spg-3200: Info: Status of DB command: 0
2016-12-01 10:25:37: spg-3007: Info: Operation successful
2016-12-01 10:25:37: spg-3001: Info: Exiting.
2016-12-01 10:25:37: sbc-3108: Info: Item processed successfully: [/opt/sesam/bin/sesam/sbc_pgsql]
2016-12-01 10:25:37: sbc-3006: Info: Saveset size: 2333 bytes. Throughput: 8.009720 MB/Hour. (@/dev/null)
2016-12-01 10:25:37: sbc-3005: Info: Closing saveset.
2016-12-01 10:25:37: sbc-3310: Info: Checksum (adler32): 2281805905. (@/dev/null)
2016-12-01 10:25:37: sbc-3052: Info: Items processed correctly: [2]. Not processed or incorrectly processed items: [0]. (@/dev/null)
2016-12-01 10:25:37: sbc-3007: Info: Operation successful.
2016-12-01 10:25:37: sbc-3001: Info: Exiting.
[root@sinus ~]#

Hi JGB,


Thank you for your responses and I've already assigned the user and password detail to the related file and it works. I can read my database list from the SEP sesam Backup Server. Thank you for your support :D

Post Reply