PostgreSQL Physical Backup & Restore
1.Full Backup
- physical backup
- logical backup
- base backup
2.Incremetal Backup
1.differential incremental backup (bart) - edb
2.cumulative incremental backup (barman)-opensource
1.Physical Backup //full backup only
1.soft or hold backup
server down timecp -rf /var/lib/pgsql/11/data /backup/bk_1
soft or hold backup restore:
su - postgres/usr/pgsql-11/bin/pg_ctl -D /backup/bk_1 start
2.hard or hot backup
server runningpostgres=#select pg_start_backup('bk_1');
show lsn
cp -rf /var/lib/pgsql/11/data /backup/bk_1
postgre=#select pg_stop_backup();
show lsn
hard or hot backup restore:
su - postgres/usr/pgsql-11/bin/pg_ctl -D /backup/bk_1 start
Comments
Post a Comment