Skip to content

Parallel server system: Backing up data

The versiondog system offers the option of backing up the data of a parallel server manually or automatically at regular intervals using a batch file.

Prerequisites

To perform a data backup of the server archive, the following mandatory prerequisites must be met:

  • The user who performs the data backup manually must have administrative rights on the server system.
  • The VDog MasterService must be terminated before the data is backed up.
  • No synchronization processes may be open.
  • The PostgreSQL database system (PostgreSQL.exe application) is terminated with the VDog MasterService. For security, you can check this in the Windows Task Manager.

Warning

The system is not available during the data backup. It is recommended to perform the data backup during off-peak times, for example, at night or on weekends.

Ways to save disk space:

  • The VD_TMP_VD directory of a server archive only contains temporary files. Back up the server archive without the VD_TMP_VD directory.
  • The vdServerArchive directory can be compressed before backing up. A corresponding ZIP application must be installed for compression.

Backing up data manually

Warning

If you use a remote archive, you must always back up both the remote archive and the local server archive.

Local archive

For server A and server B of the parallel server system: Copy the vdServerArchive directory to the desired storage location, e.g. to an external hard disk.

Remote archive

For Server A and Server B of the parallel server system: Copy the vdServerArchive directory of the remote share to the desired storage location, e.g. to an external hard disk.

Backing up data automatically

The batch file must go through the following steps:

  1. Back up the vdServerArchive directory of the first server.
  2. Back up the vdServerArchive directory of the second server.

Example: Backup.bat file

Info

If you want to use the batch file from the example for your system, adapt all path specifications in the file to your system.

set SERVERARCHIVE="D:\vdServerArchive\*"
rem If no remote archive, set the variable remotearchive to an empty value.
rem set REMOTEARCHIVE=""
set REMOTEARCHIVE="\\storage\share\vdServerArchive\*"
set OUTFILE="D:\vdServerBackup.zip"
set 7ZIP="%PROGRAMFILES(x86)%\7-Zip\7z.exe"

net stop "VDog MasterService"

if NOT "%ERRORLEVEL%"=="0" (
if NOT "%ERRORLEVEL%"=="2" (
echo Could not stop server
exit /B %ERRORLEVEL%
)
)

tasklist /fi "ImageName eq VDog*" /fo csv 2>NUL | find /I "VDog">NUL
if "%ERRORLEVEL%"=="0" (
echo VDog Processes still running
tasklist /fi "ImageName eq VDog*" /fo csv
exit /B 1
)

tasklist /fi "ImageName eq postgres.exe" /fo csv 2>NUL | find /I "postgres.exe">NUL
if "%ERRORLEVEL%"=="0" (
tasklist /fi "ImageName eq postgres.exe" /fo csv
echo VDog Processes still running
exit /B 1
)

REM Backup local ServerArchive with 7-zip
"%7ZIP%" u -t7z -r %OUTFILE% %SERVERARCHIVE%
if NOT "%ERRORLEVEL%"=="0" (
echo Could not zip server archive
exit /B %ERRORLEVEL%
)

if "%REMOTEARCHIVE%" == "" GOTO startms
REM Backup remote server archive with 7-zip
"%7ZIP%" u -t7z -r %OUTFILE% %REMOTEARCHIVE%
if NOT "%ERRORLEVEL%"=="0" (
echo Could not zip remote archive
exit /B %ERRORLEVEL%
)

:startms
net start "VDog MasterService"
if NOT "%ERRORLEVEL%"=="0" (
echo Could not start server
exit /B %ERRORLEVEL%
)

echo "success"
pause