Re: backup manifests

From: Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, Tels <nospam-pg-abuse(at)bloodgate(dot)com>, David Steele <david(at)pgmasters(dot)net>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>
Subject: Re: backup manifests
Date: 2019-12-10 11:40:35
Message-ID: CAF1DzPVuFa26xDsKG+Vbj+zLN8P4cXJ5Gdi0w8AUQ1NBKM3=HQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Please find attached patch for backup validator implementation (0004
patch). This patch is based
on Rushabh's latest patch for backup manifest.

There are some functions required at client side as well, so I have moved
those functions
and some data structure at common place so that they can be accessible for
both. (0003 patch).

My colleague Rajkumar Raghuwanshi has prepared the WIP patch (0005) for tap
test cases which
is also attached. As of now, test cases related to the tablespace and tar
backup format are missing,
will continue work on same and submit the complete patch.

With this mail, I have attached the complete patch stack for backup
manifest and backup
validate implementation.

Please let me know your thoughts on the same.

On Fri, Dec 6, 2019 at 1:44 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Thu, Dec 5, 2019 at 11:22 AM Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
> wrote:
> > Here is the whole stack of patches.
>
> I committed 0001, as that's just refactoring and I think (hope) it's
> uncontroversial. I think 0002-0005 need to be squashed together
> (crediting all authors properly and in the appropriate order) as it's
> quite hard to understand right now, and that Suraj's patch to validate
> the backup should be included in the patch stack. It needs
> documentation. Also, we need, either in that patch or a separate, TAP
> tests that exercise this feature. Things we should try to check:
>
> - Plain format backups can be verified against the manifest.
> - Tar format backups can be verified against the manifest after
> untarring (this might be a problem; not sure there's any guarantee
> that we have a working "tar" command available).
> - Verification succeeds for all available checksums algorithms and
> also for no checksum algorithm (should still check which files are
> present, and sizes).
> - If we tamper with a backup by removing a file, adding a file, or
> changing the size of a file, the modification is detected even without
> checksums.
> - If we tamper with a backup by changing the contents of a file but
> not the size, the modification is detected if checksums are used.
> - Everything above still works if there is user-defined tablespace
> that contains a table.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
>

--
--

Thanks & Regards,
Suraj kharage,
EnterpriseDB Corporation,
The Postgres Database Company.

Attachment Content-Type Size
0001-Backup-manifest-with-file-names-sizes-timestamps-opt.patch application/octet-stream 32.8 KB
0002_new_data_structure_v2.patch application/octet-stream 18.5 KB
0003-refactor.patch application/octet-stream 7.0 KB
0004-backup-validator.patch application/octet-stream 19.3 KB
0005-backup_validator_tap_test_WIP.patch application/octet-stream 5.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-12-10 11:56:56 Re: xact_start for walsender & logical decoding not updated
Previous Message Ranier Vilela 2019-12-10 11:20:44 RE: [Proposal] Level4 Warnings show many shadow vars