Documentation

BackupParameters
in package

Description of BackupArguments

Tags
author

zozlak

Table of Contents

Constants

COMPRESSION  = [self::COMPRESSION_NONE, self::COMPRESSION_BZIP, self::COMPRESSION_GZIP]
COMPRESSION_BZIP  = 'bzip'
COMPRESSION_GZIP  = 'gzip'
COMPRESSION_NONE  = 'none'
HELP_STRING  = <<<AAA backup.php [--dateFile path] [--dateFrom yyyy-mm-ddThh:mm:ss] [--dateTo yyyy-mm-ddThh:mm:ss] [--compression method] [--compressionLevel level] [--include mode] [--lock mode] [--chunkSize sizeMiB] [--dbConn connectionName] [--tmpDir tmpDir] [--checkOnly] targetFile repoConfigFile Creates a repository backup. Parameters: targetFile path of the created dump file repoConfigFile path to the repository config yaml file --dateFile path to a file storying the --dateFrom parameter value the file content is automatically updated with the --dateTo value after a successful dump which provides an easy implementation of incremental backups if the file doesn't exist, 1900-01-01T00:00:00 is assumed as the --dateFrom value --dateFrom takes precedence over --dateFile content --dateFrom, --dateTo only binaries modified within the <dateFrom, dateTo] time period are included in the dump (--dateFrom default is 1900-01-01T00:00:00, --dateTo default is current date and time) --dateFrom takes precedence over --dateFile --compression (default none) compression method - one of none/bzip/gzip --compressionLevel (default 3) compression level from 1 to 9 --include (default all) set of database tables to include: none - don't include a database dump all - include all tables skipSearch - skip full text search and spatial tables skipHistory - skip metadata history table skipSearchHistory - skip both full text search, spatial search and metadata history table --lock (default wait) - how to aquire a databse lock to assure dump consistency? try - try to acquire a lock on all matching binaries and fail if it's not possible wait - wait until it's possible to acquire a lock on all matching binaries skip - acquire lock on all matching binaries which are not cuurently locked by other database transactions It's worth noting that this applies only to Postgresql-level locks and not arche-core locks. In regard to arche-core locks (the resource.transaction_id column), only resources which are not locked by other arche-core transaction are selected. --ifOtherBackup - when set, the backup is made despite other backups being in progress; if not set and another backup is in progress, other backup attempt stops --chunkSize maximum size of resources included in a single targetFile in MB. After a resource added to the targetFile exceeds this size a new targetFile with a name suffix is created. If compression is used, the targetSize files can be smaller than this size. --dbConn (default backup) name of the database connection parameters in the config file --tmpDir (default read from the yaml config) temporary directory location. For performance reasons you might prefer to set it to the same directory as the targetFile. --checkOnly if set, the targetFile consistency is checked (hashes of files it contains are checked against hashes in the corresponding .list file) instead of a backup file creation AAA
INCLUDE  = [self::INCLUDE_ALL, self::INCLUDE_NONE, self::INCLUDE_SKIP_HISTORY, self::INCLUDE_SKIP_SEARCH, self::INCLUDE_SKIP_SEARCH_HISTORY]
INCLUDE_ALL  = 'all'
INCLUDE_NONE  = 'none'
INCLUDE_SKIP_HISTORY  = 'skipHistory'
INCLUDE_SKIP_SEARCH  = 'skipSearch'
INCLUDE_SKIP_SEARCH_HISTORY  = 'skipSearchHistory'
LOCK  = [self::LOCK_SKIP, self::LOCK_TRY, self::LOCK_WAIT]
LOCK_SKIP  = 'skip'
LOCK_TRY  = 'try'
LOCK_WAIT  = 'wait'

Properties

$checkOnly  : bool
$chunkSize  : int
$compression  : string
$compressionLevel  : int
$configFile  : string
$dateFile  : string
$dateFrom  : string
$dateTo  : string
$dbConn  : string
$ifOtherBackup  : bool
$include  : string
$lock  : string
$targetFile  : string
$tmpDir  : string|null

Methods

__construct()  : mixed
fromArgv()  : self|false
sanitizePath()  : string

Constants

COMPRESSION

public mixed COMPRESSION = [self::COMPRESSION_NONE, self::COMPRESSION_BZIP, self::COMPRESSION_GZIP]

HELP_STRING

public mixed HELP_STRING = <<<AAA backup.php [--dateFile path] [--dateFrom yyyy-mm-ddThh:mm:ss] [--dateTo yyyy-mm-ddThh:mm:ss] [--compression method] [--compressionLevel level] [--include mode] [--lock mode] [--chunkSize sizeMiB] [--dbConn connectionName] [--tmpDir tmpDir] [--checkOnly] targetFile repoConfigFile Creates a repository backup. Parameters: targetFile path of the created dump file repoConfigFile path to the repository config yaml file --dateFile path to a file storying the --dateFrom parameter value the file content is automatically updated with the --dateTo value after a successful dump which provides an easy implementation of incremental backups if the file doesn't exist, 1900-01-01T00:00:00 is assumed as the --dateFrom value --dateFrom takes precedence over --dateFile content --dateFrom, --dateTo only binaries modified within the <dateFrom, dateTo] time period are included in the dump (--dateFrom default is 1900-01-01T00:00:00, --dateTo default is current date and time) --dateFrom takes precedence over --dateFile --compression (default none) compression method - one of none/bzip/gzip --compressionLevel (default 3) compression level from 1 to 9 --include (default all) set of database tables to include: none - don't include a database dump all - include all tables skipSearch - skip full text search and spatial tables skipHistory - skip metadata history table skipSearchHistory - skip both full text search, spatial search and metadata history table --lock (default wait) - how to aquire a databse lock to assure dump consistency? try - try to acquire a lock on all matching binaries and fail if it's not possible wait - wait until it's possible to acquire a lock on all matching binaries skip - acquire lock on all matching binaries which are not cuurently locked by other database transactions It's worth noting that this applies only to Postgresql-level locks and not arche-core locks. In regard to arche-core locks (the resource.transaction_id column), only resources which are not locked by other arche-core transaction are selected. --ifOtherBackup - when set, the backup is made despite other backups being in progress; if not set and another backup is in progress, other backup attempt stops --chunkSize maximum size of resources included in a single targetFile in MB. After a resource added to the targetFile exceeds this size a new targetFile with a name suffix is created. If compression is used, the targetSize files can be smaller than this size. --dbConn (default backup) name of the database connection parameters in the config file --tmpDir (default read from the yaml config) temporary directory location. For performance reasons you might prefer to set it to the same directory as the targetFile. --checkOnly if set, the targetFile consistency is checked (hashes of files it contains are checked against hashes in the corresponding .list file) instead of a backup file creation AAA

INCLUDE

public mixed INCLUDE = [self::INCLUDE_ALL, self::INCLUDE_NONE, self::INCLUDE_SKIP_HISTORY, self::INCLUDE_SKIP_SEARCH, self::INCLUDE_SKIP_SEARCH_HISTORY]

INCLUDE_SKIP_SEARCH_HISTORY

public mixed INCLUDE_SKIP_SEARCH_HISTORY = 'skipSearchHistory'

LOCK

public mixed LOCK = [self::LOCK_SKIP, self::LOCK_TRY, self::LOCK_WAIT]

Properties

Methods

__construct()

public __construct(string $targetFile, string $configFile, string $compression, int $compressionLevel, string $lock, bool $ifOtherBackup, int $chunkSize, string $include, bool $checkOnly, string|null $tmpDir, string $dateFile, string $dateFrom, string $dateTo, string $dbConn) : mixed
Parameters
$targetFile : string
$configFile : string
$compression : string
$compressionLevel : int
$lock : string
$ifOtherBackup : bool
$chunkSize : int
$include : string
$checkOnly : bool
$tmpDir : string|null
$dateFile : string
$dateFrom : string
$dateTo : string
$dbConn : string

fromArgv()

public static fromArgv(array<string|int, string> $argv) : self|false
Parameters
$argv : array<string|int, string>
Return values
self|false

sanitizePath()

private static sanitizePath(string $path[, int $pathinfo = PATHINFO_BASENAME ]) : string
Parameters
$path : string
$pathinfo : int = PATHINFO_BASENAME
Return values
string

        
On this page

Search results