# Cannot back up PostgreSQL database with smdba

**URL:** <https://forums.suse.com/t/cannot-back-up-postgresql-database-with-smdba/32528>\
**Category:** SUSE Multi Linux Manager\
**Created:** [June 7, 2018, 9:44pm UTC](https://forums.suse.com/t/cannot-back-up-postgresql-database-with-smdba/32528 "2018-06-07T21:44:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albert](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Albert](https://forums.suse.com/u/Albert)\
**Post date:** [June 7, 2018, 9:44pm UTC](https://forums.suse.com/t/cannot-back-up-postgresql-database-with-smdba/32528/1 "2018-06-07T21:44:23Z")

</div>

Running SUMA 3.1.5. I am getting an error when trying to back up the database:

`# smdba backup-hot --enable=on --backup-dir=/var/spacewalk/db-backup
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: could not initiate base backup: ERROR: syntax error
INFO: Finished`

Any ideas?

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [June 8, 2018, 3:35pm UTC](https://forums.suse.com/t/cannot-back-up-postgresql-database-with-smdba/32528/2 "2018-06-08T15:35:01Z")

</div>

Is this a new setup, or one that has been around for a while and upgrade?  
A test setup or prod, and can you duplicate it anywhere else?

Does anything via the smdba command work, e.g.:

```auto
smdba db-stop #stopping the database
smdba db-start #restarting it
```

Is the /var/spacewalk/db-backup directly owned by, presumably, the  
postgres user and group?

I do not know that it matters, but the database connection information in  
etc/rhn/rhn.conf may be worth reviewing to see if anything is blatantly  
incorrect. Presumable your SUSE Manager installation is working, so is  
probably unlikely.

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the  
forum as I do not use the web interface often.

---

<div class="post-metadata">

**Author:** ![Albert](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Albert](https://forums.suse.com/u/Albert)\
**Post date:** [June 8, 2018, 6:58pm UTC](https://forums.suse.com/t/cannot-back-up-postgresql-database-with-smdba/32528/3 "2018-06-08T18:58:09Z")

</div>

> [@ab;52959](#):
>
> Is this a new setup, or one that has been around for a while and upgrade?

The system was originally installed with SUMA 3.0 and upgraded to 3.1.5.

> [@](#):
>
> A test setup or prod, and can you duplicate it anywhere else?

This is the only SUMA server we have so nothing else to test against.

[QUOTE]Does anything via the smdba command work, e.g.:

`
smdba db-stop #stopping the database
smdba db-start #restarting it
`[/QUOTE]

I was able to run “[FONT=Courier New]smdba space-overview[/FONT]”, “[FONT=Courier New]smdba db-status[/FONT]”, and “[FONT=Courier New]smdba space-tables[/FONT]” without any problems.

[QUOTE]Is the /var/spacewalk/db-backup directly owned by, presumably, the  
postgres user and group?[/QUOTE]

Yes, permissions on [FONT=Courier New]/var/spacewalk/db-backup[/FONT] are ok.

[QUOTE]I do not know that it matters, but the database connection information in  
etc/rhn/rhn.conf may be worth reviewing to see if anything is blatantly  
incorrect. Presumable your SUSE Manager installation is working, so is  
probably unlikely.[/QUOTE]

The settings in [FONT=Courier New]/etc/rhn/rhn.conf[/FONT] look ok.
