Autosave maps

Print Previous page Top page Next page

autosave When editing vector terrain maps, it may be necessary to return to a previous map state to evaluate changes, recover from hardware or software failure, and for other purposes. For maps that are hosted on a GIS Server, backups can be created at a specified time interval or after a specified number of editing operations. For locally located maps and for maps on the GIS Server, it is possible to cancel operations before a given point in time, but this is not always convenient and does not help in case of system failures.

In order to automatically save locally placed (on the user's computer) maps during editing, it is necessary to call the «Autosave maps» dialog in the Options/Autosave maps menu, add the map into the list of saved maps and set the frequency of making copies: after how many hours if there are any changes or after how many total changes since the previous copy was made. Copies are created in that local or network folder (storage) that the user specifies. For each map, in the storage folder a folder is created with the map name and GUID. If there are maps with the same name and the same GUID in different source folders, they will be saved in one folder in the storage. If a GUID has not been set in the map, it will be filled automatically. Inside the folder with the map name and GUID, folders are created with the year number, the current date and the copy number for the current date.

For example:

//server31//data/storage/city.sitx_09B16B973F1AA94C8875376B86380522/2024/20240215/07/city.sitx

 

No more than a specified number of copies can be saved per day. If conditions arise for creating new copies when there is already a maximum specified number, then intermediate copies are deleted, which are closer in creation time to neighboring copies. The remaining copies are renumbered sequentially.

When copying a map, all data files and service files are saved, including the transaction log (TAC, TACX), lists of objects, and so on. A record is added into the copy creation protocol with the time of copy creation, the path to the source map, and the path to the created copy. The log is created in the logs folder of the storage.

For example:

//server31//data/storage/logs/20240101_autosave.log

 

A record of the state of the last created copy is contained in the storage in the map folder in the file autosavestate.xml.

For example:

//server31//data/storage/city.sitx_09B16B973F1AA94C8875376B86380522/autosavestate.xml

 

<?xml version="1.0" encoding="UTF-8" ?>

<autosavestate lastdate="20240114" timeinsec="29432" count="7">

<source path="d:/data/city.sitx"/>

</autosavestate>

 

The «Auto-save map» dialog looks like this:

 

autosave_en_dlg

 

When the task is started, the list of maps is read from the autosave.xml service file, which is displayed in the «List of map» dialog box, and the autosave parameters, which are presented in the «General parameters» and «Special parameters» tabs.  The name of the map that has its own special parameters is highlighted in green.

The «Special parameters» tab is displayed when the Special parameters for autosaving map option is enabled in order to set personal autosave parameters values for the map.

A map can be added or deleted from the list using the buttons ic_795ic_7999 on the dialog panel.

When you click the View button, the copy download log entries for the specified date (year and month) are displayed on the screen. All logs are generated on the first day of each month and are placed in a shared storage in the logs folder.

 

The result of the program execution after clicking the Save button is the autosave.xml service file, which contains the list of maps and autosave parameters and is stored in the GIS service folder.

For example:

c:\Users\Public\Documents\Panorama\autosave.xml

 

<?xml version="1.0" encoding="UTF-8" ?>

<autosave>

<condition periodinhours="48" numberofchanges="20" limitsavesperday="8" storagetimeinmonths="18">

 <storage path="//sever31//data/storage/"/>

</condition>

<datalist>

 <item path="d:/data/city.sitx">

 </item>

 <item path="d:/data/seamap/ca39995i.sitx">

  <condition periodinhours="24" numberofchanges="10" limitsavesperday="12" storagetimeinmonths="24">

   <storage path="//sever31//data/seamap/"/>

  </condition>

 </item>

 <item path=d:/data/cadastre/pattern.sit">

 </item>

</datalist>

</autosave>

 

Autosave of the map is performed while the GIS is running, when the map is opened for editing. When autosave conditions are met, a separate program is started with parameters for creating a backup copy. In this case, folders with backup copies that are stored for more than a specified number of months are deleted.

For example:

 

autosave.exe -mc:/data/city.sitx -s//server31//storage/ city.sitx_09B16B973F1AA94C8875376B86380522/autosavestate.xml -g//server31// storage/logs/20240101_autosave.log -x8 -c6 -d