Old snapshot restore take more storage

Hi,

Recently, my node's disks filled up. To handle that I needed to optimized a couple of fact table superprojections.

The problem is that I have to duplicate the data to create the new projection. Since I have not enough space left, I needed to free some space.

To do that, I decided to restore the DB to its state two weeks ago, when it was less full. Then I would replace the projections, and reload the last two weeks of data. The backup is located in a remote server (mounted as a local directory) and is incrementally backed up daily.

To my surprise, Instead of deleting the newest files, and freeing space immediately, the file system just got more congested, got to 100% full and failed.

How is that possible? Am I doing something wrong?

Thanks,
Amos.

Comments

  • Restore doesn't touch new files until the database is starting after a full restore. Vbr wants to use existing files on the database as much as it can because then it doesn't have to copy them from the backup; hence restore goes much faster. It doesn't explicitly get rid of new files (no external tool removes data files for that matter, except in extreme cases, as it's very risky), leaving that to the database startup after the restore, because startup has the precise knowledge on how to do it.
    What's the Vertica version? You may use subset restore feature and bring back a schema/table at a time, so restore/drop new files will happen at a granular level.

  • swalkausswalkaus Employee

    vbr is playing it safe. Many dbas wouldn't want database files to be deleted until restore completed. If you aren't one of those dbas and you have a full database backup you can delete files newer than some date and then run restore (heck you could delete the entire db and restore all files) . If your backup is intact and copy succeeds your database ought to be okay but this strategy is riskier than letting vertica delete files only after a successful restore.

  • Hi.

    I did delete new data files and successfully restored it.

    Thanks for the reply.

    Cheers.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.