Class LinuxServerEnvironment
- All Implemented Interfaces:
BackupEnvironment
LinuxServerEnvironment
controls the backup system on
an Server
.
TODO: Save bandwidth by doing prelink -u --undo-output=(tmpfile) (do this to read the file instead of direct I/O). Can possibly use the distro data to know which ones are prelinked.
TODO: Use LVM snapshots when is a domU - also do MySQL lock to get steady-state snapshot
TODO: Should we use some tricky stuff to dump the databases straight out as we iterate? (Backups only) TODO: Or, just dump to disk and remove when completed? (Backups only)
TODO: Adhere to the d attribute? man chattr
- Author:
- AO Industries, Inc.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup
(FileReplication ffr) int
protected Map<String,
FilesystemIteratorRule> protected Map<String,
FilesystemIteratorRule> void
init
(FileReplication ffr) void
preBackup
(FileReplication ffr) Methods inherited from class com.aoindustries.aoserv.backup.PosixFileEnvironment
getDeviceIdentifier, getGid, getLength, getModifyTime, getPosixFile, getStat, getStatMode, getUid, readLink
Methods inherited from class com.aoindustries.aoserv.backup.FileEnvironment
getDirectoryList, getFile, getFilenameIterator, getInputStream, getNameOfFile, getRequiredFilenames, getServerPath, postBackup
-
Constructor Details
-
LinuxServerEnvironment
public LinuxServerEnvironment()
-
-
Method Details
-
getConnector
- Throws:
IOException
SQLException
-
getThisHost
- Throws:
IOException
SQLException
-
preBackup
- Specified by:
preBackup
in interfaceBackupEnvironment
- Overrides:
preBackup
in classFileEnvironment
- Throws:
IOException
SQLException
-
init
- Specified by:
init
in interfaceBackupEnvironment
- Overrides:
init
in classFileEnvironment
- Throws:
IOException
SQLException
-
cleanup
- Specified by:
cleanup
in interfaceBackupEnvironment
- Overrides:
cleanup
in classPosixFileEnvironment
- Throws:
IOException
SQLException
-
getFailoverBatchSize
- Specified by:
getFailoverBatchSize
in interfaceBackupEnvironment
- Overrides:
getFailoverBatchSize
in classFileEnvironment
- Throws:
IOException
SQLException
-
getFilesystemIteratorRules
protected Map<String,FilesystemIteratorRule> getFilesystemIteratorRules(FileReplication ffr) throws IOException, SQLException - Specified by:
getFilesystemIteratorRules
in classFileEnvironment
- Throws:
IOException
SQLException
-
getFilesystemIteratorPrefixRules
protected Map<String,FilesystemIteratorRule> getFilesystemIteratorPrefixRules(FileReplication ffr) throws IOException, SQLException - Specified by:
getFilesystemIteratorPrefixRules
in classFileEnvironment
- Throws:
IOException
SQLException
-
getDefaultSourceIpAddress
- Specified by:
getDefaultSourceIpAddress
in interfaceBackupEnvironment
- Overrides:
getDefaultSourceIpAddress
in classFileEnvironment
- Throws:
IOException
SQLException
-
getReplicatedMysqlServers
public List<Server.Name> getReplicatedMysqlServers(FileReplication ffr) throws IOException, SQLException - Specified by:
getReplicatedMysqlServers
in interfaceBackupEnvironment
- Overrides:
getReplicatedMysqlServers
in classFileEnvironment
- Throws:
IOException
SQLException
-
getReplicatedMysqlMinorVersions
public List<String> getReplicatedMysqlMinorVersions(FileReplication ffr) throws IOException, SQLException - Specified by:
getReplicatedMysqlMinorVersions
in interfaceBackupEnvironment
- Overrides:
getReplicatedMysqlMinorVersions
in classFileEnvironment
- Throws:
IOException
SQLException
-
getFastRandom
Uses the fast random source from
AoservDaemon.getFastRandom()
.- Specified by:
getFastRandom
in interfaceBackupEnvironment
- Overrides:
getFastRandom
in classFileEnvironment
-
getLogger
-