7b3c9cabf6
- RetentionPolicy (last/daily/weekly/monthly) and PruneService: forget snapshots the policy drops, delete packs nothing uses and repack mostly unused ones by copying encrypted blobs as-is; new packs are indexed before old ones are removed - a location lock keeps prune and backups apart; append-only locations are never pruned (cleanup via the location's lifecycle rules) - weekly prune from the background job; occ backup:prune [--dry-run], backup:retention, backup:target:append-only - tests: forget+prune frees space and the remaining snapshot restores identically, repack of mixed packs, dry-run preview, retention buckets
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
// SPDX-FileCopyrightText: 2026 Dillard Blom
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
namespace OCA\NgBackup\Db;
|
|
|
|
use OCP\AppFramework\Db\Entity;
|
|
|
|
/**
|
|
* @method string getName()
|
|
* @method void setName(string $v)
|
|
* @method string getBackend()
|
|
* @method void setBackend(string $v)
|
|
* @method string getAuth()
|
|
* @method void setAuth(string $v)
|
|
* @method string getOptions()
|
|
* @method void setOptions(string $v)
|
|
* @method string getBasePath()
|
|
* @method void setBasePath(string $v)
|
|
* @method string|null getRepositoryId()
|
|
* @method void setRepositoryId(?string $v)
|
|
* @method bool|null getAppendOnly()
|
|
* @method void setAppendOnly(bool $v)
|
|
* @method int getCreatedAt()
|
|
* @method void setCreatedAt(int $v)
|
|
*/
|
|
class Target extends Entity {
|
|
protected string $name = '';
|
|
protected string $backend = '';
|
|
protected string $auth = '';
|
|
protected string $options = '';
|
|
protected string $basePath = '';
|
|
protected ?string $repositoryId = null;
|
|
protected int $createdAt = 0;
|
|
protected ?bool $appendOnly = null;
|
|
|
|
public function __construct() {
|
|
$this->addType('createdAt', 'integer');
|
|
$this->addType('appendOnly', 'boolean');
|
|
}
|
|
}
|