PostgreSQL Physical Backup & Restore

1.Full Backup


  1. physical backup
  2. logical backup
  3. 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 time

cp -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 running

postgres=#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

Popular posts from this blog

PostgreSQL pg_pool-II Installation and Configuration

PostgreSQL Migration Using MTK

PostgreSQL Pages and Tuples