public interface BackupService
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkIntegrity(Path muleDistributionHome)
Checks the integrity of a backup checking the backup descriptor entries match with the current files in the backup folder
|
void |
create(MuleDistribution muleDistribution,
boolean force,
boolean isDryRunMode)
Creates a backup copy of the given file paths within the Mule distribution directory that will be undergoing the upgrade.
|
Path |
getBackupDestDir(Path muleDistroHome)
Gets the back destination dir where the backup files are going to be placed
|
void |
printBackUpDescriptor(Optional<BackupDescriptor> backupDescriptor)
Prints a BackUp Descriptor with a pretty format .
|
Optional<BackupDescriptor> |
readBackupDescriptor(Path muleDistribution)
Retrieves the backup creation metadata stored in the YAML file within the backup directory location if any has been
previously generated as part of an upgrade process.
|
Optional<BackupDescriptor> readBackupDescriptor(Path muleDistribution) throws IOException
muleDistribution - location of the Mule distribution where backup could reside.Optional of a BackupDescriptor.IOException - In case of any I/O related error while reading the info from the metadata file.void create(MuleDistribution muleDistribution, boolean force, boolean isDryRunMode) throws IOException
muleDistribution - a MuleDistribution representing the Mule distro where the backup will be taken from.isDryRunMode - if isDryRunMode is true, the method logs in debug level the files and directories that would be
copied without actually copying them.IOException - In case of any I/O related error while creating the backup.void printBackUpDescriptor(Optional<BackupDescriptor> backupDescriptor)
backupDescriptor - BackUp Descriptor selected.boolean checkIntegrity(Path muleDistributionHome) throws IOException
muleDistributionHome - location of the Mule distribution where backup could reside.IOException - In case of any I/O related error while creating the backup.Path getBackupDestDir(Path muleDistroHome)
muleDistroHome - Path with the mule distribution where is going to be resolved the backup folder pathCopyright © 2022 MuleSoft, Inc.. All rights reserved.