Skip to content

restore wal

pgrecm edited this page Jan 12, 2022 · 1 revision

Home - Top

This command restore WAL files onto the desired diretory.

Options/Qualfiers

/verbose Display more details.
/cid="CID" Restore WAL files from a different cluster.
/file="..." Restore a specific WAL file.
/uid="UID" Restore all WAL files from a specific backup UID.
/before="DATE" Restore all WAL files before the specified date.
/after="DATE" Restore all WAL files after the specified date.
/directory="PATH" Restore all WAL files into a different folder then the default 'WALDIR' (see modify cluster).
/first="..." Specify the FIRST WAL file , and it Will restore all the following files.(Can be used with '/last')
/last="..." Specify the LAST WAL file , and it Will restore all the WAL files until it reach the last one specified.(Can be used with '/first')

Description

Connection to a DEPOSIT is mandatory.

Example

RECM> list wal; 
List WALs of cluster 'R6666' (CID=3)
Bck ID                 Status     TL    WAL                       Date                          
---------------------- ---------- ----- ------------------------- ------------------------------
000361d3893529f33a59   AVAILABLE      1 00000001000000000000001F.gz 2021-11-22 07:41:00           
 + - - - - -------->   AVAILABLE      1 000000010000000000000020.gz 2021-11-22 07:41:14           
 + - - - - -------->   AVAILABLE      1 000000010000000000000021.gz 2021-11-22 07:41:36           
 + - - - - -------->   AVAILABLE      1 000000010000000000000022.gz 2021-11-22 07:41:38           
 + - - - - -------->   AVAILABLE      1 000000010000000000000023.gz 2021-12-06 17:57:32           
 + - - - - -------->   AVAILABLE      1 000000010000000000000024.gz 2021-12-06 17:57:42           
 + - - - - -------->   AVAILABLE      1 000000010000000000000025.gz 2021-12-27 16:05:00           
 + - - - - -------->   AVAILABLE      1 000000010000000000000026.gz 2021-12-27 16:59:18           
 + - - - - -------->   AVAILABLE      1 000000010000000000000027.gz 2021-12-27 16:59:28           
 + - - - - -------->   AVAILABLE      1 000000010000000000000028.gz 2021-12-27 16:59:58           
 + - - - - -------->   AVAILABLE      1 000000010000000000000029.gz 2021-12-27 17:00:06           
 + - - - - -------->   AVAILABLE      1 00000001000000000000002A.gz 2021-12-29 09:43:26           
 + - - - - -------->   AVAILABLE      1 00000001000000000000002B.gz 2021-12-29 09:43:38           
 + - - - - -------->   AVAILABLE      1 00000001000000000000002C.gz 2022-01-01 05:39:52           
 + - - - - -------->   AVAILABLE      1 00000001000000000000002D.gz 2022-01-03 18:39:20           
 + - - - - -------->   AVAILABLE      1 00000001000000000000002E.gz 2022-01-03 18:39:32           
000361d389502c329c4b   AVAILABLE      1 00000001000000000000002F.gz 2022-01-03 18:39:50           
 + - - - - -------->   AVAILABLE      1 000000010000000000000030.gz 2022-01-03 18:39:58           
000361d409821a787579   AVAILABLE      1 000000010000000000000031.gz 2022-01-04 03:46:52           
000361d4098820af19da   AVAILABLE      1 000000010000000000000032.gz 2022-01-04 03:46:58           
000361d9cdde362585a7   AVAILABLE      1 000000010000000000000033.gz 2022-01-04 03:47:04           
 + - - - - -------->   AVAILABLE      1 000000010000000000000034.gz 2022-01-08 12:45:52           
RECM> restore wal /dir="/tmp/mydir"/first=00000001000000000000002A.gz /last="00000001000000000000002D.gz"/verbose 
recm-inf: Restoring '/tmp/mydir/00000001000000000000002A.gz'
recm-inf: Restoring '/tmp/mydir/00000001000000000000002B.gz'
recm-inf: Restoring '/tmp/mydir/00000001000000000000002B.00000028.backup.gz'
recm-inf: Restoring '/tmp/mydir/00000001000000000000002C.gz'
recm-inf: Restoring '/tmp/mydir/00000001000000000000002D.gz'
RECM>  
Clone this wiki locally