Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions docs/migration.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Migrate from PostgreSQL to Percona Distribution for PostgreSQL

# Migrate from PostgreSQL to Percona Distribution for PostgreSQL

Percona Distribution for PostgreSQL includes the PostgreSQL database and additional extensions that have been selected to cover the needs of the enterprise and are guaranteed to work together. Percona Distribution for PostgreSQL is available as a software collection that is easy to deploy.

We encourage users to migrate from their PostgreSQL deployments based on community binaries to Percona Distribution for PostgreSQL. This document provides the migration instructions.
We encourage users to migrate from their PostgreSQL deployments based on community binaries to Percona Distribution for PostgreSQL. This document provides the migration instructions.

Depending on your business requirements, you may migrate to Percona Distribution for PostgreSQL either [on the same server](#migrate-on-the-same-server) or [onto a different server](#migrate-on-a-different-server).
Depending on your business requirements, you may migrate to Percona Distribution for PostgreSQL either [on the same server](#migrate-on-the-same-server) or [onto a different server](#migrate-on-a-different-server).

## Migrate on the same server

=== ":material-debian: :material-debian: On Debian and Ubuntu Linux"
=== ":material-debian: On Debian and Ubuntu Linux"

>To ensure that your data is safe during the migration, we recommend to make a backup of your data and all configuration files (such as `pg_hba.conf`, `postgresql.conf`, `postgresql.auto.conf`) using the tool of your choice. The backup process is out of scope of this document. You can use `pg_dumpall` or other tools of your choice. For more information, see the blog post [PostgreSQL Upgrade Using pg_dumpall](https://www.percona.com/blog/postgresql-upgrade-using-pg_dumpall/) by _Avinash Vallarapu_, _Fernando Laudares Camargos_, _Jobin Augustine_ and _Nickolay Ihalainen_.
>To ensure that your data is safe during the migration, we recommend to make a backup of your data and all configuration files (such as `pg_hba.conf`, `postgresql.conf`, `postgresql.auto.conf`) using the tool of your choice. The backup process is out of scope of this document. You can use `pg_dumpall` or other tools of your choice. For more information, see the blog post [PostgreSQL Upgrade Using pg_dumpall :octicons-link-external-16:](https://www.percona.com/blog/postgresql-upgrade-using-pg_dumpall/) by _Avinash Vallarapu_, _Fernando Laudares Camargos_, _Jobin Augustine_ and _Nickolay Ihalainen_.

Run **all** commands as root or via **sudo**:
{.power-number}
Expand Down Expand Up @@ -49,7 +48,6 @@ Depending on your business requirements, you may migrate to Percona Distribution
$ sudo systemctl start postgresql.service
```


=== ":material-redhat: On RHEL and derivatives"

> To ensure that your data is safe during the migration, we recommend to make a backup of your data and all configuration files (such as `pg_hba.conf`, `postgresql.conf`, `postgresql.auto.conf`) using the tool of your choice. The backup process is out of scope of this document. You can use `pg_dumpall` or other tools of your choice.
Expand Down Expand Up @@ -84,15 +82,13 @@ Depending on your business requirements, you may migrate to Percona Distribution
$ sudo systemctl start postgresql-{{pgversion}}
```


## Migrate on a different server

In this scenario, we will refer to the server with PostgreSQL Community as the "source" and to the server with Percona Distribution for PostgreSQL as the "target".

To migrate from PostgreSQL Community to Percona Distribution for PostgreSQL on a different server, do the following:

**On the source server**:
{.power-number}
### **On the source server** {.power-number}

1. Back up your data and all configuration files (such as `pg_hba.conf`, `postgresql.conf`, `postgresql.auto.conf`) using the tool of your choice.
2. Stop the `postgresql` service
Expand All @@ -109,12 +105,11 @@ To migrate from PostgreSQL Community to Percona Distribution for PostgreSQL on a
$ sudo systemctl stop postgresql-{{pgversion}}
```

3. Optionally, remove PostgreSQL Community packages
3. Optionally, remove PostgreSQL Community packages

**On the target server**:
{.power-number}
### **On the target server** {.power-number}

1. [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html)
1. [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html)
2. Enable the repository

```{.bash data-prompt="$"}
Expand All @@ -135,4 +130,4 @@ To migrate from PostgreSQL Community to Percona Distribution for PostgreSQL on a

```{.bash data-prompt="$"}
$ sudo systemctl start postgresql-{{pgversion}}
```
```