#include <BackupsManager.hpp>
|
static std::vector< BackupInfo > | getSortedBackups () |
|
static bool | createNewBackup (bool limitBackupsQuantity=true) |
| Created a new backup.
|
|
static void | limitBackupQuantity () |
| Limit the quantity of backups files saved at once. Deletes the oldest backups if limit is exceeded.
|
|
static bool | deleteBackup (const BackupInfo &backupInfo) |
| Deletes a specific backup.
|
|
static bool | restoreBackup (const BackupInfo &backupInfo, CDialog *dlgFather) |
| Restores a specific backup. Created a backup of the app state before the restoration and overrided the Project and .diamar folders with the backups. Reads the restored project and downloads the changes to the modules. If this process fails, the app state won't be changed (Project and .diamar folders are recovered), but modules downloads won't be reversed. Requires reboot after this process.
|
|
◆ createNewBackup()
bool BackupsManager::createNewBackup |
( |
bool | limitBackupsQuantity = true | ) |
|
|
static |
Created a new backup.
- Parameters
-
limitBackupsQuantity | If the limit of backup files should be considered to remove oldest. |
- Returns
- TRUE if the backup has been successful, otherwise, FALSE.
◆ deleteBackup()
bool BackupsManager::deleteBackup |
( |
const BackupInfo & | backupInfo | ) |
|
|
static |
Deletes a specific backup.
- Parameters
-
backupInfo | Info of the backup file. |
- Returns
- TRUE if the backup is deleted, otherwise, FALSE.
◆ getSortedBackups()
Gets backups files sorted from newest to oldest.
- Returns
- BackupInfos of existing backups files.
◆ limitBackupQuantity()
void BackupsManager::limitBackupQuantity |
( |
| ) |
|
|
static |
Limit the quantity of backups files saved at once. Deletes the oldest backups if limit is exceeded.
◆ restoreBackup()
bool BackupsManager::restoreBackup |
( |
const BackupInfo & | backupInfo, |
|
|
CDialog * | dlgFather ) |
|
static |
Restores a specific backup. Created a backup of the app state before the restoration and overrided the Project and .diamar folders with the backups. Reads the restored project and downloads the changes to the modules. If this process fails, the app state won't be changed (Project and .diamar folders are recovered), but modules downloads won't be reversed. Requires reboot after this process.
- Parameters
-
backupInfo | Backup to restore. |
dlgFather | Dialog father. |
- Returns
- TRUE if the backup is restored successfully, otherwise, false.
< Mapa NombreCarpeta - PathCarpeta
< Nombre de copia del Project por si falla el restore
< Nombre de copia del .diamar por si falla el restore
◆ kBackupExtension
const std::string BackupsManager::kBackupExtension {"zip"} |
|
staticconstexpr |
◆ kBackupPrefix
const std::string BackupsManager::kBackupPrefix {"backup"} |
|
staticconstexpr |
◆ kBackupsFolder
const std::string BackupsManager::kBackupsFolder {"Backups"} |
|
staticconstexpr |
◆ kMaxBackups
const uint64_t BackupsManager::kMaxBackups {10} |
|
staticconstexpr |
The documentation for this class was generated from the following files: