YaWK
24.1
Yet another WebKit
|
Public Member Functions | |
__construct ($db) | |
backup constructor. prepare temp folder on class instantiation More... | |
checkFolders ($restoreFolders) | |
check restore folders, check + set permissions of restore folders More... | |
checkPermissions ($folder) | |
check folder permissions and return permissions as string (eg 0755) More... | |
checkZipFunction () | |
Check if ZipArchive function exists. More... | |
doRestore ($db, $restoreFolders) | |
Restore Data physically to folder, restore .sql file to database if needed. More... | |
getArchiveBackupFilesArray () | |
get all files from archive backup folder into array More... | |
getCurrentBackupFilesArray () | |
get all files from current backup folder into array More... | |
init ($db) | |
Init Backup Class (run backup) More... | |
parseIniFile ($db, $iniFile) | |
Parse backup ini file. More... | |
restore ($db, $file, $folder) | |
Manage how a backup will be restored from backup folder. More... | |
run ($db) | |
Run a new backup, depending on chosen backup method. More... | |
runDatabaseBackup ($db, $storeSqlTmp) | |
Include mysql backup class and run mysqldump backup. More... | |
runFileBackup ($db) | |
Run File Backup from $sourceFolder. More... | |
setIniFile (object $db) | |
Set backup information file (backup.ini) More... | |
setPermissions ($folder, $filemode) | |
set folder permissions and do some chmod stuff to with given $filemode to $folder More... | |
zipFolder ($db, $source, $destination) | |
Zip a whole folder from $source to $destination.zip. More... | |
Public Attributes | |
$archiveBackupFile = '' | |
$archiveBackupFiles = array() | |
$archiveBackupFolder = '../system/backup/archive/' | |
$archiveBackupNewFile = '' | |
$archiveBackupSubFolder = '' | |
$archiveBackupSubFolders = array() | |
$backupMethod = "database" | |
$backupSettings = array() | |
$configFile = '' | |
$configFilename = "backup.ini" | |
$currentBackupFiles = array() | |
$currentBackupFolder = '../system/backup/current/' | |
$downloadFolder = '../system/backup/download/' | |
$fileBackup | |
$mysqlBackup | |
$overwriteBackup = "true" | |
$removeAfterZip = "true" | |
$restoreFile = '' | |
$restoreFiles = array() | |
$restoreFolder = '' | |
$restoreFolders = array() | |
$restoreMode = '' | |
$restoreStatus = array() | |
$sourceFolder = '' | |
$storeSqlTmp = "false" | |
$targetFolder = '../system/backup/current/' | |
$tmpFolder = '../system/backup/tmp/' | |
$zipBackup = "true" | |
Definition at line 20 of file backup.php.
YAWK\BACKUP\backup::__construct | ( | $db | ) |
backup constructor. prepare temp folder on class instantiation
$db |
Definition at line 84 of file backup.php.
YAWK\BACKUP\backup::checkFolders | ( | $restoreFolders | ) |
check restore folders, check + set permissions of restore folders
$restoreFolders |
Definition at line 821 of file backup.php.
References $folder, $item, YAWK\BACKUP\backup\$restoreFolders, YAWK\BACKUP\backup\checkPermissions(), and YAWK\BACKUP\backup\setPermissions().
YAWK\BACKUP\backup::checkPermissions | ( | $folder | ) |
check folder permissions and return permissions as string (eg 0755)
$folder |
Definition at line 905 of file backup.php.
References $folder.
Referenced by YAWK\BACKUP\backup\checkFolders().
YAWK\BACKUP\backup::checkZipFunction | ( | ) |
Check if ZipArchive function exists.
Definition at line 423 of file backup.php.
Referenced by YAWK\BACKUP\DATABASE\mysqlBackup\generateZipArchive(), YAWK\BACKUP\backup\restore(), and YAWK\BACKUP\backup\zipFolder().
YAWK\BACKUP\backup::doRestore | ( | $db, | |
$restoreFolders | |||
) |
Restore Data physically to folder, restore .sql file to database if needed.
$db | |
$restoreFolders |
db | $db |
Definition at line 695 of file backup.php.
References $db, $folder, YAWK\BACKUP\backup\$restoreFolders, YAWK\BACKUP\backup\$restoreStatus, YAWK\BACKUP\backup\parseIniFile(), YAWK\sys\recurseRmdir(), and YAWK\sys\xcopy().
Referenced by YAWK\BACKUP\backup\restore().
YAWK\BACKUP\backup::getArchiveBackupFilesArray | ( | ) |
get all files from archive backup folder into array
Definition at line 354 of file backup.php.
References YAWK\BACKUP\backup\$archiveBackupFiles, archiveBackupFiles, and YAWK\filemanager\getFilesFromFolderToArray().
YAWK\BACKUP\backup::getCurrentBackupFilesArray | ( | ) |
get all files from current backup folder into array
Definition at line 335 of file backup.php.
References YAWK\BACKUP\backup\$currentBackupFiles, and YAWK\filemanager\getFilesFromFolderToArray().
YAWK\BACKUP\backup::init | ( | $db | ) |
Init Backup Class (run backup)
object | $db | database object |
Definition at line 120 of file backup.php.
References $db, and YAWK\BACKUP\backup\run().
YAWK\BACKUP\backup::parseIniFile | ( | $db, | |
$iniFile | |||
) |
Parse backup ini file.
$db | |
$iniFile |
Definition at line 304 of file backup.php.
References YAWK\BACKUP\backup\$backupSettings, and $db.
Referenced by YAWK\BACKUP\backup\doRestore(), and YAWK\BACKUP\backup\restore().
YAWK\BACKUP\backup::restore | ( | $db, | |
$file, | |||
$folder | |||
) |
Manage how a backup will be restored from backup folder.
$db | |
$file | |
$folder |
Definition at line 552 of file backup.php.
References $db, $folder, $res, YAWK\BACKUP\backup\$restoreStatus, YAWK\BACKUP\backup\checkZipFunction(), YAWK\BACKUP\backup\doRestore(), YAWK\filemanager\getSubfoldersToArray(), and YAWK\BACKUP\backup\parseIniFile().
YAWK\BACKUP\backup::run | ( | $db | ) |
Run a new backup, depending on chosen backup method.
object | $db | database object |
$db | db |
Definition at line 138 of file backup.php.
References $db, YAWK\BACKUP\backup\runDatabaseBackup(), and YAWK\BACKUP\backup\runFileBackup().
Referenced by YAWK\BACKUP\backup\init().
YAWK\BACKUP\backup::runDatabaseBackup | ( | $db, | |
$storeSqlTmp | |||
) |
Include mysql backup class and run mysqldump backup.
Definition at line 373 of file backup.php.
References $db, and YAWK\BACKUP\backup\$storeSqlTmp.
Referenced by YAWK\BACKUP\backup\run().
YAWK\BACKUP\backup::runFileBackup | ( | $db | ) |
Run File Backup from $sourceFolder.
Definition at line 400 of file backup.php.
References $db.
Referenced by YAWK\BACKUP\backup\run().
YAWK\BACKUP\backup::setIniFile | ( | object | $db | ) |
Set backup information file (backup.ini)
object | $db | database handle |
will be added to every .zip file to identify what to do during restore process
Definition at line 254 of file backup.php.
References YAWK\BACKUP\backup\$configFilename, $db, and YAWK\sys\writeIniFile().
Referenced by YAWK\BACKUP\DATABASE\mysqlBackup\doSqlBackup().
YAWK\BACKUP\backup::setPermissions | ( | $folder, | |
$filemode | |||
) |
set folder permissions and do some chmod stuff to with given $filemode to $folder
$folder | |
$filemode |
Definition at line 861 of file backup.php.
References $folder.
Referenced by YAWK\BACKUP\backup\checkFolders().
YAWK\BACKUP\backup::zipFolder | ( | $db, | |
$source, | |||
$destination | |||
) |
Zip a whole folder from $source to $destination.zip.
Definition at line 440 of file backup.php.
References $_GET, $db, and YAWK\BACKUP\backup\checkZipFunction().
Referenced by YAWK\BACKUP\FILES\fileBackup\doFolderBackup().
YAWK\BACKUP\backup::$archiveBackupFile = '' |
string | archive backup file |
Definition at line 43 of file backup.php.
YAWK\BACKUP\backup::$archiveBackupFiles = array() |
array | files in archive backup folder |
Definition at line 41 of file backup.php.
Referenced by YAWK\BACKUP\backup\getArchiveBackupFilesArray().
YAWK\BACKUP\backup::$archiveBackupFolder = '../system/backup/archive/' |
string | archive backup folder path |
Definition at line 35 of file backup.php.
YAWK\BACKUP\backup::$archiveBackupNewFile = '' |
string | new archive file |
Definition at line 45 of file backup.php.
YAWK\BACKUP\backup::$archiveBackupSubFolder = '' |
string | archive working subfolder |
Definition at line 39 of file backup.php.
Referenced by YAWK\BACKUP\FILES\fileBackup\startFileBackup(), and YAWK\BACKUP\DATABASE\mysqlBackup\startMysqlBackup().
YAWK\BACKUP\backup::$archiveBackupSubFolders = array() |
array | all sub folders in archiveBackupFolder |
Definition at line 37 of file backup.php.
YAWK\BACKUP\backup::$backupMethod = "database" |
string | files|database|complete |
Definition at line 51 of file backup.php.
Referenced by YAWK\BACKUP\FILES\fileBackup\setBackupSettings().
YAWK\BACKUP\backup::$backupSettings = array() |
array | backup settings |
Definition at line 57 of file backup.php.
Referenced by YAWK\BACKUP\backup\parseIniFile(), and YAWK\BACKUP\FILES\fileBackup\setBackupSettings().
YAWK\BACKUP\backup::$configFile = '' |
string | config file, including path |
Definition at line 55 of file backup.php.
YAWK\BACKUP\backup::$configFilename = "backup.ini" |
string | filename of the config file (default: backup.ini) |
Definition at line 53 of file backup.php.
Referenced by YAWK\BACKUP\backup\setIniFile().
YAWK\BACKUP\backup::$currentBackupFiles = array() |
array | files in current backup folder |
Definition at line 33 of file backup.php.
Referenced by YAWK\BACKUP\backup\getCurrentBackupFilesArray().
YAWK\BACKUP\backup::$currentBackupFolder = '../system/backup/current/' |
string | current backup folder path |
Definition at line 31 of file backup.php.
YAWK\BACKUP\backup::$downloadFolder = '../system/backup/download/' |
string | upload folder |
Definition at line 47 of file backup.php.
YAWK\BACKUP\backup::$fileBackup |
object | files backup object |
Definition at line 25 of file backup.php.
YAWK\BACKUP\backup::$mysqlBackup |
object | mysql backup object |
Definition at line 23 of file backup.php.
YAWK\BACKUP\backup::$overwriteBackup = "true" |
string | overwrite backup files? |
Definition at line 59 of file backup.php.
Referenced by YAWK\BACKUP\FILES\fileBackup\initFolderBackup(), and YAWK\BACKUP\DATABASE\mysqlBackup\initMysqlBackup().
YAWK\BACKUP\backup::$removeAfterZip = "true" |
string | remove files after zip is complete |
Definition at line 63 of file backup.php.
YAWK\BACKUP\backup::$restoreFile = '' |
string | restore file (zip file) |
Definition at line 67 of file backup.php.
YAWK\BACKUP\backup::$restoreFiles = array() |
array | restorable files (files from tmp folder) |
Definition at line 69 of file backup.php.
YAWK\BACKUP\backup::$restoreFolder = '' |
string | restore from folder |
Definition at line 73 of file backup.php.
YAWK\BACKUP\backup::$restoreFolders = array() |
array | restore folders (content, media, system) |
Definition at line 71 of file backup.php.
Referenced by YAWK\BACKUP\backup\checkFolders(), and YAWK\BACKUP\backup\doRestore().
YAWK\BACKUP\backup::$restoreMode = '' |
string | restore mode (database, mediafolder, complete, custom) |
Definition at line 75 of file backup.php.
YAWK\BACKUP\backup::$restoreStatus = array() |
array | holds information about the restore process states |
Definition at line 77 of file backup.php.
Referenced by YAWK\BACKUP\backup\doRestore(), and YAWK\BACKUP\backup\restore().
YAWK\BACKUP\backup::$sourceFolder = '' |
string | source folder to backup |
Definition at line 29 of file backup.php.
YAWK\BACKUP\backup::$storeSqlTmp = "false" |
string | should .sql backup be stored in tmp folder? |
Definition at line 65 of file backup.php.
Referenced by YAWK\BACKUP\DATABASE\mysqlBackup\initMysqlBackup(), and YAWK\BACKUP\backup\runDatabaseBackup().
YAWK\BACKUP\backup::$targetFolder = '../system/backup/current/' |
string | path, where the backup will be stored |
Definition at line 27 of file backup.php.
YAWK\BACKUP\backup::$tmpFolder = '../system/backup/tmp/' |
string | tmp folder |
Definition at line 49 of file backup.php.
YAWK\BACKUP\backup::$zipBackup = "true" |
string | zip backup if possible |
Definition at line 61 of file backup.php.
Referenced by YAWK\BACKUP\FILES\fileBackup\initFolderBackup(), and YAWK\BACKUP\DATABASE\mysqlBackup\initMysqlBackup().