Skip to main content

A Gentoo Build Publisher plugin to dump & restore builds

Project description

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

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.

Project details


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.2.0.tar.gz (13.7 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.2.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gbp_archive-1.2.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for gbp_archive-1.2.0.tar.gz
Algorithm Hash digest
SHA256 4d99f1711d30d0a152065b46033fb8f1878285f9ef173779f6aa0a4ec9a9be43
MD5 157ae808adc8988861a1dac39c52e8ab
BLAKE2b-256 902b0861d2bb81df241e550882bac5ad4f1f76aed7a96cd660daacb8ca74dbee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbp_archive-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for gbp_archive-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a50770d3284a0796bbc2c966fd767bb97313cbf6cfb78dc0e3d3ed6fbca3a75
MD5 cc7b7685a47af5168b2085d7280b8fbb
BLAKE2b-256 5fede63fec53f8b97f91edbd06540af7e0efd4b4975563b9d7e4d9b5e3e7c20e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page