ossc-db / pg_rman

Backup and restore management tool for PostgreSQL
http://ossc-db.github.io/pg_rman/index.html
Other
476 stars 77 forks source link

Merge backup data support #234

Open 8ugMak1r opened 2 years ago

8ugMak1r commented 2 years ago

Suppose I have backup below:

=====================================================================
 StartTime           EndTime              Mode    Size   TLI  Status
=====================================================================
2022-09-26 22:08:10  2022-09-26 22:10:13  INCR   15MB      1  OK
2022-09-26 20:08:10  2022-09-26 20:10:13  INCR   15MB      1  OK
2022-09-26 17:08:10  2022-09-26 17:10:13  FULL   102MB     1  OK

And I want to merge all of it by excuting pg_rman merge xxx, and the backup will be like:

=====================================================================
 StartTime           EndTime              Mode    Size   TLI  Status
=====================================================================
2022-09-26 22:08:10  2022-09-26 22:10:13  FULL   122MB     1  OK

Why I need this feature:

  1. make recover fast
  2. reduce backup size (removing old data file and arch log)
  3. frequently full backup big size database is a bad idea (for reason1)