Menu

#74 Backups not cleaned up even if KEEP_DATA_GENERATIONS is set

Accepted
None
High
Other
2014-01-10
2014-01-07
No

Setting for example KEEP_DATA_GENERATIONS=1 should make the latest full backup and its related intermediate incremental/archive backups disappear but it is not the case.

In order to reproduce that, simply set KEEP_DATA_GENERATIONS=1 in pg_rman.ini and then run two times pg_rman backup -b full. The oldest backup will NOT be deleted.

Looks like there is a lot of dead code in clean.c. Otsuka-san, are you planning to spend time looking at my patches?

Discussion

  • otsuka.knj

    otsuka.knj - 2014-01-10
    • status: New --> Accepted
    • assigned_to: otsuka.knj
     
  • otsuka.knj

    otsuka.knj - 2014-01-10

    Thanks for your report.
    It takes is a little time, but I would like to take a look at your patches.
    Please attach them.

     
  • Michael Paquier

    Michael Paquier - 2014-01-10

    Yes, thanks. I got something like 15-20 patches, fixing numerous issues and making the code more stable and more readable. Some of them change quite a bit of things, but core functionality remains unchanged. I have actually spent quite a long among of time to make pg_rman more enterprise-class in a fork on github => https://github.com/michaelpq/pg_rman

    There are many things making me worrying about the current quality of the code:

    • Some options are not documented or even useless
    • backup method for standby is obscure as you need to connect to both the master and the slave to perform a backup. We should reach a state where user only need to connect to the standby to take a full or incremental backup, in the same fashion as pg_basebackup. Archive backup is excluded in this case.
    • The concept of filesystem snapshot is not part of backup/restore utility but should be created and managed as a wrapper on top of it.
    • backup from stream is not supported, all the data needs to be local.
    • documentation maintenance should be done inside the code. We should use something based on asciidoc to generate man pages and html documentation from a single text source like what pgbouncer does.
    • Some APIs should be taken directly from Postgres core, like pg_crc.h
    • A version of pg_rman built on a given major version of Postgres should only work with this major version of Postgres
    • Multi-versioning inside code itself proves to be a pain to maintain
    • This project would attract more attention if not on SourceForge. These days community developers are more attracted by github...
    • pg_rman error messages are really obscure
    • code is not enough severe when it checks for full backup on current timeline
    • pg_rman show timeline is actually useless. It would be better to gather all the information in a single table. Columns Data and Total should be merged into a single column.
    • Output of pg_rman show is not flexible at all. We should have the possibility to add something like output in json for example.
     
  • Michael Paquier

    Michael Paquier - 2014-01-10
    • Flexible output for pg_rman show would be good for UIs!
    • Not possible to force a full backup if none is found on a current timeline. This is damn cool for cron jobs for example after a server initialization.
     

Log in to post a comment.

MongoDB Logo MongoDB