Skip to main content

gbp-archive

A Gentoo Build Publisher plugin to dump & restore builds.

Description

The gbp-archive package provides two subcommands for gbpcli: dump and restore. These subcommands are "server-only" meaning they are only available from the GBP server instance. The dump subcommand can dump all the builds on the instance, just a particular machine or machines, or a particular build or builds, or any combination of those.

screenshot

Then restoring is as simple as running gbp restore:

screenshot

"Gentoo" and the Gentoo logo are trademarks of the Gentoo Foundation. This project is not affiliated with or endorsed by the Gentoo Foundation.

Installation

This assumes you already have a working Gentoo Build Publisher installation. If not refer to the GBP Install Guide first.

Install the gbp-archive package onto the GBP instance.

cd /home/gbp
sudo -u gbp -H ./bin/pip install gbp-archive

There is no need to restart any services after installation.

Process

Dump

How the dump process works is a tar archive is created. Inside that tar archive are 3 items:

Metadata

The first item is a JSON file containing metadata for the dump. Currently the metadata are:

  • The version number of the dump file
  • A timestamp for when the dump was created
  • The hostname of the GBP instance that created the dump
  • The list of builds included in the dump

Records

The second item is a file which includes all the "records" for the dumped builds. This is the build metadata stored the GBP database. This information is serialized into JSON and stored in a single file, records.json.

Storage

The third item is another tar archive consisting of the "storage" for the dumped builds. By storage I mean all of the repos, binpkgs, and configuration for builds. All of them are stored in an inner tar archive called storage.tar. The reason for the single archive and not one archive per build is to preserve the multiple hard links which span across builds (for a given machine). They would not be preserved across multiple archives.

Restore

For the restore process, we open the outer tar archive and then the records.json file is deserialized and loaded into the instance's database. Then we extract the contents of storage.tar to the root of the instance's storage root. Currently the restore process is all-or-nothing. But in the future I will add the ability to filter out what builds get restored.

Metadata

Release files for gbp-archive 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gbp-archive 1.3.0
File Size Uploaded Provenance Actions
gbp_archive-1.3.0.tar.gz 14.1 kB Without provenance Details for gbp_archive-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gbp-archive 1.3.0
File Interpreter ABI Platform Actions
gbp_archive-1.3.0-py3-none-any.whl Python 3 none any Details for gbp_archive-1.3.0-py3-none-any.whl

Total release size: 25.5 kB

Release files / gbp_archive-1.3.0.tar.gz

Download URL gbp_archive-1.3.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d4681bd7a36907d696938da377845febc009085fdaf9165e107a3d8d1bf67b26
BLAKE2b-256 checksum
How to use checksums
97738bc49f95db29d94b6f4cb3353275ef891844bce12b1f75976999fd857aa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / gbp_archive-1.3.0-py3-none-any.whl

Download URL gbp_archive-1.3.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5614b849f4d21d6d4908f3ae9ceaf05421bb9f91c75e4aa46ad6495ac2b83c74
BLAKE2b-256 checksum
How to use checksums
20a8a3efbc3580463fe1dee7fb374a39ffa193d4fc8fbbe802c4d0fe41818afc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for gbp-archive 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page