Backup TDPS

Questions and information regarding the TeamDrive Personal Server - Fragen und Informationen zum TeamDrive Personal Server

Backup TDPS

Postby Birger » 23 Apr 2012, 13:12

Hallo Zusammen,

wir haben einen Teamdrive Personal Server auf einem Ubuntu-Server aufgesetzt und erstellen täglich ein Backup mit Hilfe von rsync. Ich habe jetzt in der Anleitung gelesen, dass die last.log Dateien beim Backup gelockt werden sollten. Unsere Server Konfiguration lässt dies nicht ohne weiteres zu und wir möchten ungern den Server für das Backup stoppen. Daher wollte ich mal fragen, was genau die Gefahren sind, wenn man die Daten ohne Lock backuped? Können die Daten verloren gehen? Oder geht es dabei nur um aktuelle Änderungen zum Zeitpunkt des Backups?


Danke und Grüße
Birger
 
Posts: 1
Joined: 23 Apr 2012, 13:05

Re: Backup TDPS

Postby stephanm » 01 Sep 2012, 00:40

We also require the answer to this question. Because of firewall constraints, we can only mount the TeamDrive data/ directory over NFS (tdpsd running on NFS server), and cannot sync tdpsd going down timed to just during backups.

The manual is vague as to how the "last.log" files are locked, and what should be backed up while each lock is held (and what the possible adverse consequences are.) The current instructions make little sense: our protolog/ directories have only one "last.log" file and nothing else. What is the "highest numbered log file"?

Finally, it appears you might be using flock() and not fcntl(), is this true? flock() will not work over NFS (which transparently converts flock() to fcntl() in kernel) so the NFS client will succeed in acquiring the flock() even if the tdpsd has an flock() already, and vice versa. Thus if flock() is the synchronization mechanism it will fail with NFS if either tdpsd or backup process host are an NFS server. Please clarify how to perform live backups. Thanks
stephanm
 
Posts: 1
Joined: 01 Sep 2012, 00:22

Re: Backup TDPS

Postby Kenneth » 06 Sep 2012, 16:55

We recommend not to use NFS.

1 Backup and Restore
1.1 Backup your Personal Server
All you need to reconstruct your TeamDrive Personal Server in case of a total failure of your hard disk, is
the repository and the configuration file. That’s why it is inevitable to backup those two components.
We also advice you to backup these components before performing an update.
1.2 Backup and Restore
The administrator is responsible for the security of TeamDrive space data stored by TDPS. In the following
section we discuss backup and restore procedures for the repository data directory.
1.2.1 Backup Procedure
The simplest way to make a backup is to shutdown TDPS and make a complete copy of the repository data
directory (referenced by the repository-data system parameter). You may also wish to make backups of the
configuration file (tdps.config), and mime.types if you have modified this file.
Of course, instead of a complete copy rsync can be used to update an existing backup.
1.2.2 Online Backup
If your availability requirements do not allow the server to be shutdown then you can perform an online
backup by following this procedure:
• For each space (numbered directories) in the repository-data directory, do the following:
o
Backup the log files in the protolog sub-directory as follows:
• Lock the file called last.log, if it exists. (optional software required)
• Scan the directory and determine the highest numbered log file.
• Backup the last.log file.
• Unlock the last.log file. (optional software required)
• Backup all numbered log files with a number equal to or less than the highest number
found in the previous step.
o
Backup all files in the data sub-directory.
• Backup all remaining files in the repository-data directory.
1.2.3 Restore Procedure
Restore can only be done offline. Even if only part of the space repository is restored, TDPS will run the
recovery procedure for the entire repository. This is not a problem because the clients can recognise if a
space has not changed after restore and will continue with the space as normal.
Follow this procedure to restore the repository-data directory:
• Shutdown TDPS.
• Replace the repository-data directory with your backup.
As mentioned above, you may also restore space directories selectively.

• Start TDPS with the --restored option.
TDPS will recover all spaces in the repository before it allows any client connections.
As an alternative to the --restored option, creating a file in the repository-data directory called restored will
have the same effect. If TDPS is stopped during the recovery process it will automatically resume the recovery process when it starts again.
The restore-state contains the information relevant to the restore procedure. If recovery is in progress, and
you wish TDPS to start the recovery again from the beginning (for example, because you have restored different data), then remove this file and start TDPS with the --restored option again.
During recovery, TDPS scans each space and determines the current log offset. It write this information to
the a file called r-state in the space. If also increments the global restore-id. The restore-id the time of the
restore in seconds since 01-01-2010.
1.2.4 TeamDrive Client Space Recovery
TeamDrive client space recovery occurs automatically if necessary. The TeamDrive client software checks
the restore state of space if the clients local restore-id of a space is not equal to the global restore-id on
the server. If the client‘s log offset is beyond the server side offset (after 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 is 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 changed
files. Some co-ordination with other users of the space may be required to prevent duplicating this procedure.

For more information, please consult page 33 of Personal Server Manual: http://www.teamdrive.com/static/pdf/en/TeamDrive_Personal_Server_manual_en.pdf
Kenneth
 
Posts: 1277
Joined: 29 Aug 2012, 15:11

Re: Backup TDPS

Postby berfh » 24 Aug 2013, 17:25

Hallo zusammen,
welche Software soll ich für diesen Punkt aus der Anleitung verwenden:
"Lock the file called last.log, if it exists. (optional software required)"
Ich würde das Backup als Batch Script in Kombination mit FastCopy durchführen wollen. Aber wie kann ich die last.log Mithilfe der Konsole sperren?
Welche Backup-Strategie verwendet ihr bzw. welche Scripte setzt ihr ein?
Vielen Dank
berfh
 
Posts: 3
Joined: 08 Apr 2013, 19:44


Return to TeamDrive Personal Server (TDPS)

Who is online

Users browsing this forum: No registered users and 11 guests

cron