Create directory for logs backup
This commit is contained in:
parent
29c1aa21c9
commit
a36b8ec1f2
@ -57,6 +57,7 @@ public class RotatedLogsBackupProcess extends BackupProcess {
|
|||||||
boolean success = false;
|
boolean success = false;
|
||||||
|
|
||||||
File targetDir = getTargetDir();
|
File targetDir = getTargetDir();
|
||||||
|
targetDir.mkdirs();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
List<File> filesToMove = getFilesToMove();
|
List<File> filesToMove = getFilesToMove();
|
||||||
@ -65,7 +66,7 @@ public class RotatedLogsBackupProcess extends BackupProcess {
|
|||||||
try {
|
try {
|
||||||
Files.move(source, new File(targetDir, source.getName()));
|
Files.move(source, new File(targetDir, source.getName()));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.severe("Unable to move file " + source + " into " + targetDir);
|
Log.severe("Unable to move file " + source + " into " + targetDir, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user