\DNDataTransfer
Class representing a single data transfer in a project, which can include a database export, an archive of all assets, or both.
It can be one of two directions:
- Backup: Package up data on an environment and store it in a local file
- Restore: Transfer data from a local file into an environment, extract assets and/or restore a database
The choice of database and/or assets is represented in the "Mode".
There's always one file archive involved (stored as the has_one "ArchiveFile") on the local Deploynaut environment.
Each transfer is executed by a Resque job, so the model also contains
a reference to a Resque token (which might still be in progress).
The "Environment" points to the source or target involved.
Synopsis
class DNDataTransfer
extends DataObject
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static string $singular_name = 'Data Transfer';
- private static string $plural_name = 'Data Transfers';
- private static array $summary_fields = ;
- private static array $searchable_fields = ;
- protected bool $backupBeforePush = true;
- // methods
- public void setBackupBeforePush()
- public void getTitle()
- public void Link()
- public void LogLink()
- public void getDefaultSearchContext()
- public void getCMSFields()
- public void start()
- public bool canView()
- protected string logfile()
- public DeploynautLogFile log()
- public string LogContent()
- public void getDescription()
- public void getModeNice()
- public boolean IsBackupDataTransfer()
- public string ResqueStatus()
Hierarchy
Extends
- DataObject
Members
private
- $db
- $has_one
- $plural_name
- $searchable_fields
- $singular_name
- $summary_fields
protected
- $backupBeforePush
—
bool
When running the transfer, should a backup be performed before pushing the data?
Methods
protected
- logfile() — Return a path to the log file.
public
- IsBackupDataTransfer() — Is this transfer an automated backup of a push transfer?
- Link()
- LogContent()
- LogLink()
- ResqueStatus()
- canView()
- getCMSFields()
- getDefaultSearchContext()
- getDescription()
- getModeNice()
- getTitle()
- log()
- setBackupBeforePush()
- start() — Queue a transfer job