postgresqlpgbackrest

Boot backup image of server when postgres replication configured


I am running a server in Linode.

I am backing up to a s3 type server using pgbackrest. Streaming backup.

Linode takes a complete image of my server.

I am spinning up a server using a backup image to test a linux upgrade.

My concern is that Postgres is configured to start on boot-up. I fear that it will connect to the pgbackrest store with the same configuration as the primary server, with possibly bad results.

Has anyone got any advice before I boot the server?

Thanks


Solution

  • It turned out straight forward.

    Linode created the copy of the server but did not start it.

    I was able to start the new server in "rescue" mode. I connected via the web interface (LISH).

    I mounted the hard drive, /dev/sdb, I think.

    I edit /etc/pgbackrest/pgbackrest.conf and commented out the information.

    I edited /var/spool/cron/crontabs/* and commented out everything.

    I then booted the server.

    I modified /etc/hosts on my local PC to direct to the backup server, and verified it.

    I was able to test my Linux upgrade before touching my production server.