I will be performing a postgres upgrade from 11.5 to 12.5 that will affect production environment. The first step assumes, that the most recent backup of database was taken, before upgrading - we would like to reduce time of this stage, due to performing upgrade in night hours. After unsuccessful research I would like to as if taking a backup made few hours before exact upgrade backup will reduce the time of next backup procedure?
-
"snapshot" has a meaning in PostgreSQL which differs from what you use here. Are you talking about a file-system snapshot? Or a PostgreSQL backup? Or something else?– jjanesMar 16, 2021 at 13:37
-
Thanks for correcting me, actually I ment database backup– Michał DygasMar 16, 2021 at 14:03
1 Answer
That depends on how you take the backup.
If you use pg_dump
or pg_basebackup
, the backup time is not influenced by how long ago the previous backup was taken.
If you backup with pg_basebackup
or another online file system backup technique, you don't need a new backup. Just use the previous one and the WAL archives, and you can restore any point in time in the life of the database.