Class BackupUtil
- java.lang.Object
-
- jetbrains.buildServer.serverSide.maintenance.BackupUtil
-
public final class BackupUtil extends Object
Static procedures and functions, that work with without a database, for backup.- Author:
- Leonid Bushuev from JetBrains
- See Also:
BackupDatabaseUtil
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkFolderIsEnoughEmptyToRestoreFromBackup(File dir, Set<String> excludingFiles)
Checks whether the directory is empty (or contains at most a directory hierarchy without files).static void
extractJdbcDriversToDir(File jdbDirToExtract, ZipReader zipReader, String defaultJdbsDir)
static File
prepareBackupFileSpec(ServerPaths serverPaths, String fileName)
-
-
-
Method Detail
-
extractJdbcDriversToDir
public static void extractJdbcDriversToDir(@NotNull File jdbDirToExtract, @NotNull ZipReader zipReader, String defaultJdbsDir) throws IOException
- Throws:
IOException
-
checkFolderIsEnoughEmptyToRestoreFromBackup
public static boolean checkFolderIsEnoughEmptyToRestoreFromBackup(@NotNull File dir, @NotNull Set<String> excludingFiles)
Checks whether the directory is empty (or contains at most a directory hierarchy without files). Returns
true
if the directory doesn't exist or contain files, except those matching the exclusion rules. Returnsfalse
ifdir
exists but is not a directory.- Parameters:
dir
- the directory to check.excludingFiles
- the exclusion rules to apply to child files (if any exist).- Returns:
true
if the directory doesn't contain files matching the exclusion rules,false
otherwise.
-
prepareBackupFileSpec
@NotNull public static File prepareBackupFileSpec(@NotNull ServerPaths serverPaths, @NotNull String fileName)
-
-