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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gbp_archive-1.3.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gbp_archive-1.3.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file gbp_archive-1.3.0.tar.gz.

File metadata

  • Download URL: gbp_archive-1.3.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for gbp_archive-1.3.0.tar.gz
Algorithm Hash digest
SHA256 d4681bd7a36907d696938da377845febc009085fdaf9165e107a3d8d1bf67b26
MD5 12d224b492aaa610e8a79f113102cc4c
BLAKE2b-256 97738bc49f95db29d94b6f4cb3353275ef891844bce12b1f75976999fd857aa4

See more details on using hashes here.

File details

Details for the file gbp_archive-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: gbp_archive-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for gbp_archive-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5614b849f4d21d6d4908f3ae9ceaf05421bb9f91c75e4aa46ad6495ac2b83c74
MD5 68c465defe85d6a001a5f0ce16a4570f
BLAKE2b-256 20a8a3efbc3580463fe1dee7fb374a39ffa193d4fc8fbbe802c4d0fe41818afc

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

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