turnkeylinux / tracker

TurnKey Linux Tracker
https://www.turnkeylinux.org
68 stars 16 forks source link

TKLBAM: On PostgreSQL appliance - not including `postgres` DB by default, or even if explictly noted as a "limit" #1943

Open JedMeister opened 3 weeks ago

JedMeister commented 3 weeks ago

I have recently worked with a TKLBAM user who reported that on the PostgreSQL appliance the (default included) postgres DB is not included in the backup. He tested explicitly adding it to the limits/overides and it still wasn't included.

I'm not clear why that is the case. I'm not particularly familiar with PostgreSQL but I know that MySQL/MariaDB has a mysql DB that is not intended for end user data (it contains DB structure/schema and user info). I wonder if that is also the case for PostgreSQL?

It doesn't appear to be as my testing showed it as empty by default. I have also done a bit of reading online and whilst most guidance suggests that it's "best practice" to not use it, beyond that there doesn't seem like there is any reason why it shouldn't be used.

As such, IMO it should be included in the backup by default. I can't see any downside to that. If it's just an empty DB, then it will add very little to the backup size. And whilst users should be testing their backups, it might still avoid a user having a nasty surprise when restoring!