HomeQuick Start
Get started quickly
Quick Start Guide
Follow these steps to get PDU up and running in minutes.
1
Clone Repository
git clone https://github.com/wublabdubdub/PDU-PostgreSQLDataUnloader.git2
Build the Executable
Modify the database version as needed. For example, to set PG 15:
sed -i 's/#define PG_VERSION_NUM [0-9]\+/#define PG_VERSION_NUM 15/g' basic.hCompile the code:
make3
Configure pdu.ini
File contents:
PGDATA=/home/15pg/data
ARCHIVE_DEST=/home/15pg/wal_arch
DISK_PATH=/dev/mapper/xman-data
BLOCK_INTERVAL=20
PGDATA_EXCLUDE=1. To recover deleted/updated data, fill in PGDATA and ARCHIVE_DEST
2. To recover dropped data, fill in DISK_PATH
4
Enter PDU
Run the compiled executable:
./pduPDU Terminal
+------------------------------------------------+ | Copyright 2024-2025 ZhangChen | | PDU: PostgreSQL Data Unloader | | Version 3.0.25.12 (2025-12-11) | | Valid Until 2124-12-11 10:00:00 | +------------------------------------------------+ Current DB Supported Version: ----------------------------- * PostgreSQL 15 +--------------------------------------+ | COMMUNITY VERSION | +--------------------------------------+ | * Licensed to everyone | | * Full functionality | | * Max 1000 GB Per Table | | * Max 200 Columns Per Table | | * Max 100000 Object Per Schema | +--------------------------------------+ PDU.public=#
5
Initialize Data Directory
b;PDU Terminal
PDU.public=# b;
Initializing...
-pg_database:</home/postgres/data/global/1262>
Database:postgres
-pg_schema:</home/postgres/data/base/5/2615>
-pg_class:</home/postgres/data/base/5/1259> 84 Records
-pg_attribute:</home/postgres/data/base/5/1249> 3169 Records
Schema:
▌ public 1 tables
Database:mydb
-pg_schema:</home/postgres/data/base/16384/2615>
-pg_class:</home/postgres/data/base/16384/1259> 256 Records
-pg_attribute:</home/postgres/data/base/16384/1249> 4096 Records
Schema:
▌ public 42 tables
PDU.public=#6
Select Database and Schema, Then Run Operations
use <dbname>;
set <schemaname>;Common Commands
PDU command cheat sheet, grouped by workflow for quick lookup.
| b; | Initialize metadata for the current instance |
| exit; | \q; | Leave the PDU interactive shell |