Package timedrive :: Package background :: Module backupjob :: Class BackupJob
[frames] | no frames]

Class BackupJob


Class that executes backup jobs and updates user on progress. Designed to run as a background thread so that the main GUI instance remains responsive.

Nested Classes

Inherited from PyQt4.QtCore.QThread: Priority

Instance Methods
 
__init__(self, parent=None)
Initialization function for BackupJob
 
StartBackup(self, settings)
Start a backup job, either from the GUI or from the command line.
Boolean
isValidExclude(self, exclude, mountpoint=None)
check if exclude type is know and validate the exclude
 
process_duplicityError(self, task, result_err, folder)
Error processing of duplicity
excludeList []
buildExcludeList(self, excludeItemList, mountpoint=None)
Builds an valid Exclude list based on ExcludeItems
 
doBackupJob(self, include, archiveUrl, gnuPassphrase)
Does the backup job for a single folder, archive url already build
 
run(self)
The run it self, to process each folder in the folder list.

Inherited from backgroundtask.BackgroundTask: questionPrompt, setupTaskProgress, start, taskComplete, taskError, toggleControls, updateTaskProgress

Inherited from PyQt4.QtCore.QThread: currentThread, currentThreadId, exec_, exit, finished, idealThreadCount, isFinished, isRunning, msleep, priority, quit, setPriority, setStackSize, setTerminationEnabled, sleep, stackSize, started, terminate, terminated, usleep, wait, yieldCurrentThread

Inherited from PyQt4.QtCore.QObject: blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from sip.simplewrapper: __delattr__, __getattribute__, __new__, __setattr__

Inherited from object: __format__, __hash__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __str__, __subclasshook__

Class Variables

Inherited from PyQt4.QtCore.QThread: HighPriority, HighestPriority, IdlePriority, InheritPriority, LowPriority, LowestPriority, NormalPriority, TimeCriticalPriority

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties

Inherited from backgroundtask.BackgroundTask: default_message, restart, stop, task_name

Inherited from object: __class__

Method Details

__init__(self, parent=None)
(Constructor)

 

Initialization function for BackupJob

Parameters:
  • parent (BackgroundTask Object)
Overrides: object.__init__

StartBackup(self, settings)

 

Start a backup job, either from the GUI or from the command line.

Parameters:
  • settings (Settings Object)

isValidExclude(self, exclude, mountpoint=None)

 

check if exclude type is know and validate the exclude

Parameters:
  • exclude (ExcludeItem Object) - the exclude of type ExcludeItem
  • mountpoint (String) - in this case it's added for remote folders to define there mount points, because it could change on a different computer.
Returns: Boolean

process_duplicityError(self, task, result_err, folder)

 

Error processing of duplicity

Parameters:
  • task (String) - the name of task where the error occured
  • result_err (String) - message that contains the error
  • folder (IncludeItem Object) - the includeitem for whitch the error occured

buildExcludeList(self, excludeItemList, mountpoint=None)

 

Builds an valid Exclude list based on ExcludeItems

Parameters:
  • exclude - the list of type ExcludeItem
  • mountpoint (String) - default : none in this case it's added for remote folders to define there mount points, because it could change on a different computer.
  • excludeItemList (list (ExcludeItem Object))
Returns: excludeList []
returns a list to pass on to duplicity's interface.

doBackupJob(self, include, archiveUrl, gnuPassphrase)

 

Does the backup job for a single folder, archive url already build

Parameters:
  • folder (IncludeItem Object)
  • archiveUrl (String)
  • gnuPassphrase (String)

run(self)

 

The run it self, to process each folder in the folder list.

Overrides: PyQt4.QtCore.QThread.run