\Horde\BackupReader

The backup reader class that reads backups from the backup directory.

Summary

Methods
Properties
Constants
__construct()
listBackups()
restore()
No public properties found
No constants found
_restoreFromZip()
_restoreFromTar()
_buildCollections()
_getBackupFiles()
$_dir
N/A
No private methods found
No private properties found
N/A

Properties

$_dir

$_dir : string

Backup directory.

Type

string

Methods

__construct()

__construct(string  $directory) 

Constructor.

Parameters

string $directory

Backup directory.

listBackups()

listBackups() : \Horde\Backup\Iterator

Returns the available user backups.

Returns

\Horde\Backup\Iterator —

A list of user backups.

restore()

restore(array  $applications = array(), array  $users = array()) : array<mixed,\Horde\Backup\Collection>

Returns user data from backups.

Parameters

array $applications

A list of applications to restore. Defaults to all backups.

array $users

A list of users to restore. Defaults to all backups.

Returns

array<mixed,\Horde\Backup\Collection> —

All restored object collections.

_restoreFromZip()

_restoreFromZip(string  $file, array  $applications) : array<mixed,\Horde\Backup\Collection>

Restores user data from a ZIP file.

Parameters

string $file

Pathname to a ZIP backup file.

array $applications

A list of applications to restore. Defaults to all backups.

Returns

array<mixed,\Horde\Backup\Collection> —

All restored object collections.

_restoreFromTar()

_restoreFromTar(string  $file, array  $applications) : array<mixed,\Horde\Backup\Collection>

Restores user data from a TAR file.

Parameters

string $file

Pathname to a TAR backup file.

array $applications

A list of applications to restore. Defaults to all backups.

Returns

array<mixed,\Horde\Backup\Collection> —

All restored object collections.

_buildCollections()

_buildCollections(array  $files, array  $applications, string  $contents, string  $user, callable  $factory) : array<mixed,\Horde\Backup\Collection>

Builds a list of object collections from any Horde_Compress backend.

Parameters

array $files

Archive info from Horde_Compress.

array $applications

A list of applications to restore. Defaults to all backups.

string $contents

The archive file contents.

string $user

A user name.

callable $factory

A factory for iterators that are passed to \Horde\Backup\Collection.

Returns

array<mixed,\Horde\Backup\Collection> —

All restored object collections.

_getBackupFiles()

_getBackupFiles(array  $users) : array

Builds a backup iterator for individual users.

Parameters

array $users

A list of users.

Returns

array —

A list of backup files.