From: | Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com> |
---|---|
To: | Matthias Apitz <guru(at)unixarea(dot)de> |
Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: (13.1) pg_basebackups ./. pg_verifybackup |
Date: | 2021-08-11 19:17:32 |
Message-ID: | CAM+6J96QjiaBDKOemvqCddmrJn3PYpE_m91iyheyfE6TQUCPXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>
>
> Could some kind sol acknowledge me that this is the correct procedure to
> use pg_verifybackup? Thanks in advance
>
>
postgres(at)db:~/playground/demo$ initdb -D db 2>/dev/null 1>&2
postgres(at)db:~/playground/demo$ pg_ctl -D db -l logfile start 2>/dev/null
1>&2
postgres(at)db:~/playground/demo$ psql -c 'create table t(id int primary key);
insert into t select x from generate_series(1, 10000) x;'
INSERT 0 10000
postgres(at)db:~/playground/demo$ pg_basebackup -U postgres -Ft -z -D
basebackup
postgres(at)db:~/playground/demo$ echo $?
0
postgres(at)db:~/playground/demo$ cd basebackup
postgres(at)db:~/playground/demo/basebackup$ ls
backup_manifest base.tar.gz pg_wal.tar.gz
postgres(at)db:~/playground/demo/basebackup$ tar xzf base.tar.gz
postgres(at)db:~/playground/demo/basebackup$ cd pg_wal/
postgres(at)db:~/playground/demo/basebackup/pg_wal$ mv ../pg_wal.tar.gz . #
pg_wal.tar.gz file has to uncompressed in pg_wal dir
postgres(at)db:~/playground/demo/basebackup/pg_wal$ tar xzf pg_wal.tar.gz
postgres(at)db:~/playground/demo/basebackup/pg_wal$ cd ../..
postgres(at)db:~/playground/demo$ find basebackup -name '*tar.gz'
basebackup/base.tar.gz
basebackup/pg_wal/pg_wal.tar.gz
postgres(at)db:~/playground/demo$ find basebackup -name '*tar.gz' -delete
postgres(at)db:~/playground/demo$ find basebackup -name '*tar.gz'
postgres(at)db:~/playground/demo$ pg_verifybackup basebackup
backup successfully verified
Backup and Restore a PostgreSQL Cluster With Multiple Tablespaces Using
pg_basebackup - Percona Database Performance Blog
<https://www.percona.com/blog/2018/12/21/backup-restore-postgresql-cluster-multiple-tablespaces-using-pg_basebackup/>
--
Thanks,
Vijay
Mumbai, India
From | Date | Subject | |
---|---|---|---|
Next Message | Vijaykumar Jain | 2021-08-11 19:38:47 | Re: (13.1) pg_basebackups ./. pg_verifybackup |
Previous Message | Matthias Apitz | 2021-08-11 17:09:30 | Re: (13.1) pg_basebackups ./. pg_verifybackup |