The synchronization of the DB holdings constitute a special problem for a distributed system like NGAS.

A unidirectional DB replication from Chile (La Silla/Paranal) is provided. Problem is that replication is only implemented from Chile to Garching. I.e., when there are
changes in the DB in Garching, this is not reflected in the DBs in Chile. This problem has been solved by implementing an internal DB synchronization scheme within
the NG/AMS SW:

The NG/AMS Server keeps a DB Snapshot file on each disk (<Mount Point>/.db/NgasFiles.bsddb). This is a file based DB (Berkeley DB/DBM). It contains the DB information about the files archived on that disk. Whenever  changes are introduced in the DB concerning files (e.g. when files are deleted), the DB Snapshot is updated accordingly. When the disk is put online at another NGAS site, the DB there is updated according to the DB Snapshot. I.e., if files are registered in the local DB but not found in the DB Snapshot + not stored
on the disk, the entries are deleted from the DB. This is used e.g. for the disk recycling where files/disks are removed from the DB in Garching and the disk re-appears at the observatory site.

The DB Snapshot can also be used as a sort of table of contents for the files stored on the disk.