Class BackupManager
java.lang.Object
com.aoindustries.aoserv.daemon.backup.BackupManager
The BackupManager handles the storing and retrieval of backup data from
the backup partitions. It also keeps the
/var/opt/aoserv-daemon/oldaccounts
directory clean.- Author:
- AO Industries, Inc.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbackupAndDeleteFiles(List<File> deleteFileList) Backs-up and then deletes the provided files.static voidcreateTarball(List<File> files, File backupFile) Makes a tarball of the provided files into the provided file.static longstatic longstatic FilegetNextBackupFile(String extension) Gets the next backup filename in the oldaccounts directory.static FileGets the next backup file for ".tgz" extension.
-
Field Details
-
DF
The full path to the df command.- See Also:
-
-
Method Details
-
backupAndDeleteFiles
Backs-up and then deletes the provided files.- Throws:
IOExceptionSQLException
-
createTarball
Makes a tarball of the provided files into the provided file.- Throws:
IOException
-
getDiskDeviceTotalSize
- Throws:
IOException
-
getDiskDeviceUsedSize
- Throws:
IOException
-
getNextTarballBackupFile
Gets the next backup file for ".tgz" extension.- Throws:
IOException- See Also:
-
getNextBackupFile
Gets the next backup filename in the oldaccounts directory. The filename format isYYYYMMDD_HHMMSS_CextensionwhereCa counter starting at one. The file is created empty with permissions 0600.- Throws:
IOException
-
