I'm about to upgrade my webserver, my site relies heavily on PostgreSQL database and settings. I started apt-get dist-upgrade, and it says it wants to upgrade Postgres. I cancelled, but will it wipe out my database and settings? I know, "backup" and I have, but I still prefer not to set it up again if I can avoid it.

  • 1
    Make sure you understand the difference between apt-get dist-upgrade and upgrading from one version of Ubuntu to another, they are not the same thing. – Panther Jul 15 '13 at 21:14

No, it shouldn't overwrite any databases. As for the settings, the new package may have updated settings files (eg. for a new default value or a completely new setting) but it should always ask you for a confirmation about overwriting the settings. That dialogue will also have an option to compare the new and old settings file and an option to keep the old settings. Since you have a backup, it is safe to install the update.


It will not wipe out your database or settings.

But there is a chance that you will run into Debian bug #714725, which will cause your old server package to be uninstalled, leaving you unable to access your data. For example, if you now have postgresql-8.4 installed and the upgrade proposes to install postgresql-9.1, the old 8.4 instance should just keep on running. But it's possible that apt-get dist-upgrade decides to uninstall the postgresql-8.4 package, which wouldn't be good. So be sure to read the output of apt-get dist-upgrade about what it proposes to do. If you don't like what it proposes to remove, run something like apt-get install postgresql-8.4 to mark the package(s) as manually installed.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.