gufo.thor.backup.info¶
Backup information model.
BackupInfo
dataclass
¶
Metadata describing a completed backup.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Backup directory name. |
ts |
datetime
|
Backup directory creation time. |
postgres_size |
int | None
|
PostgreSQL dump size in bytes, if present. |
mongo_size |
int | None
|
MongoDB dump size in bytes, if present. |
clickhouse_size |
int | None
|
ClickHouse archive size in bytes, if present. |
duration |
timedelta | None
|
Time from directory creation to the latest dump modification. |
from_dir(path)
classmethod
¶
Create backup metadata from a backup directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
Backup directory path. |
required |
Returns:
| Type | Description |
|---|---|
BackupInfo
|
Metadata for the backup directory. |