Crate tocco_s3

Source
Expand description

§Manage S3 and S3 backups

Used to manage objects created by Tocco.

See also S3 Storage Design Overview.

§Code Overview

WhereWhat
fs::ArchiveRepresentationof a backup archive and its configuration.
state::DbState DB for tracking live objects.
dbObtaining list of objects from DB servers.

§Configuration

Archives are configured via config.toml in the archive’s root directory. Run tocco-s3 init to initialize a repository with a default config, then modify it as needed:

[archive]
# Minimum number of object that must exist in archive.
#
# (optional, default = 1)
# min_objects = 1

# Path to state DB.
#
# (optional, default="state.sqlite")
#
# Relitive paths are relative to the directory containing this config.
# state_db_path = "state.sqlite"

[s3]
endpoint = "https://objects.rma.cloudscale.ch"

# Either set an API key for Cloudscale …
cloudscale_api_key = "<unset>"

# … or list all buckets with keys.
#
# During regular operations cloudscale_api_key should be used. This option exists
# to ease restoring on a non-Cloudscale S3 cluster in case of an emergency.
#
# [s3.keys.bucket_name]
# access_key = "<unset>"
# secret_key = "<unset>"

[removal]
# Objects that have not been reference by Nice database
# (prod or test) are removed.
#
# (min=90)
retention_time_days = 180

# Enable dry run which only prints what be deleted
#
# (optional, default: false)
dry_run = true

[[db_servers]]
host_name = "db.example.net"

# (optional)
ssh_user = "postgres"

# (optional)
ssh_port = 22

# Minimum number of objects that must exist on server. Enforced
# by `tocco-s3 check-availability`.
#
# (optional, default=1)
# min_objects = 1

Re-exports§

pub use error::Error;
pub use error::Result;
pub use fs::Archive;

Modules§

cloudscale
Cloudscale object user
common
db
DB servers and hashes in DB
error
fs
Object backups stored in file system
hash
Hash used to identify object and its content
s3
S3 storage interaction
state
State Database