NextDom\Managers\BackupManager
Class BackupManager
Synopsis
class BackupManager
{
- // members
- private static $logLevel = NULL;
- // methods
- public static void backup()
- public static bool createBackup()
- public static void getBackupDirectory()
- public static string getBackupFilename()
- public static void backupPlugins()
- public static void repairDB()
- public static void createDBBackup()
- public static void createBackupArchive()
- private static void addPathToArchive()
- public static void rotateBackups()
- public static array getBackupFileInfo()
- public static bool sendRemoteBackup()
- public static void restore()
- public static bool restoreBackup()
- public static string getLastBackupFilePath()
- private static string extractArchive()
- private static void restorePlugins()
- private static void restorePublicPerms()
- private static void restoreDatabase()
- public static void loadSQLFromFile()
- private static void restoreJeedomConfig()
- private static void restoreCustomData()
- private static void restoreCache()
- private static void updateConfig()
- private static void initValues()
- private static void clearCache()
- public static array listBackup()
- public static void removeBackup()
- private static void loadSQLMigrateScript()
Members
private
- $logLevel — null
Methods
private
- addPathToArchive()
- clearCache()
- extractArchive() — Extracts backup archive to a temporary folder
- initValues() — Init default values
- loadSQLMigrateScript() — Loads migrate script into mysql database
- restoreCache() — Restore cache from backup archive
- restoreCustomData() — Restore custom data from backup archive
- restoreDatabase() — Loads mysql dump from backup archive into database
- restoreJeedomConfig() — Import common config if not already exists
- restorePlugins() — Restore plugins from backup archive
- restorePublicPerms() — Restore www-data owner and 775 permissions on directory
- updateConfig()
public
- backup() — Creates a backup archive
- backupPlugins() — Runs backup method for each active plugins if available
- createBackup() — Runs the backup procedure
- createBackupArchive() — Creates an archive with all files that should be included in backup
- createDBBackup() — Creates a backup of database to given output file path
- getBackupDirectory() — Returns backup directory according to backup::path
- getBackupFileInfo() — Creates an array with information about existing backup files
- getBackupFilename() — Computes backup filename from nextdom's name and current datetime
- getLastBackupFilePath() — Returns path to last available backup archive
- listBackup() — Get the list of backups
- loadSQLFromFile() — Load given file in mysql database
- removeBackup() — Remove a backup file
- repairDB() — Checks and repair database
- restore() — Restore a backup from file
- restoreBackup() — Runs the restore procedure
- rotateBackups() — Removes backup archives according to backup::keepDays and backup::maxSize
- sendRemoteBackup() — Trigger remote upload for all available repos