Backup and Restoration
Backing Up the TDPS
Online Backup
- For each Space (numbered directories) in the repository data directory, do the following:
- Backup the log files in the protolog sub-directory as follows:
- Lock the file called “last.log”, if it exists (additional software required).
- Scan the directory and determine the highest numbered log file.
- Backup the “last.log” file.
- Unlock the “last.log” file (additional software required).
- Backup all numbered log files with a number equal to or less than the highest number found in the previous step.
- Additionally, backup all files in the data sub-directory.
- Finally, backup all remaining files in the repository data directory.
Restoring a TeamDrive Personal Server
A restore can only be done offline. Even if only part of the space repository is restored, TeamDrive Personal Server will run the recovery procedure for the entire repository. This is not an issue because the clients can recognize if a Space has not changed after the restoration process and will continue to use the Space as it did before.
Follow this procedure to restore the repository data directory:
- Shutdown the TeamDrive Personal Server.
- Replace the repository data directory with your backup.
- As mentioned above, you may also restore Space directories selectively.
- Start the TeamDrive Personal Server with the –restored option.
- This can be done through the “Command Prompt” or “Terminal”.
- As an alternative to the –restored option, creating an empty file (a file with no extension) in the repository data directory called “restored” will have the same effect.
- The path to the data directory (repository) can be found in the file “tdps.config”.
- The TeamDrive Personal Server will recover all Spaces in the repository before it allows any client connections.
If the TeamDrive Personal Server is stopped during the recovery process it will automatically resume the recovery process when it starts again.
Post Restore
After the recovery, a file called “restore-state” will be created. The “restore-state” file contains the information relevant to the restore procedure.
If recovery is in progress, and you would like for the TDPS to start the recovery again from the beginning (for example, because you have restored different data), then remove this file and start the TeamDrive Personal Server with the –restored option again.
During recovery, the TDPS scans each space and determines the current log offset. It writes this information to a file called “restore-state” in the Space.
It also increments the global “restore-id”. The “restore-id” is the time of the restore in seconds from 01-01-2010.
TeamDrive Client Space Recovery
TeamDrive client Space recovery occurs automatically if necessary. The TeamDrive client software checks the restore state of a Space if the client’s local “restore-id” of a Space is not equal to that of the global “restore-id” on the server.
If the client’s log offset is beyond the server side offset (after the restore), the client will begin local recovery of the Space. The client recovers a Space by resetting the local copy of the space to the state of the Space at the time of the restore (as it was on the server).
Before this is done, a backup copy of the local space data is made. The user is then responsible to check if there are any local changes to the Space in the backup, but not in the Space. The user should then apply these changes to the Space, for example, by copying over the changed files. Some coordination with other users of the Space may be required to prevent duplicating this procedure.
Please feel free to contact us with regard to any additional assistance needed with the procedure to update or restore a TDPS.