Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

 
alt

Daniel Nashed

 

    Domino Backup which type of integration would you expect?

    Daniel Nashed  9 July 2019 17:00:53
    There have been a couple of other projects including Domino on Docker which took some time.
    So it took some time until I was able to look into the Backup project again.
    I have build a configuration, log and restore job database. It can be all in one database or in separate databases.

    The integration with standard backup software for single database or snapshot backup is implemented via command-files.

    So for each backup or restore of a database a OS level command is called.
    I wrote some shell scripts / batch files which are invoked with a set of parameters.
    Those scripts can be changed to fit for any backup solution which allows command-line integration.

    The idea is to keep it very flexible. Here is an example for backup of a notes database including logging into a central log-file to show which parameters are specified.

    Die Shell Script/Batch files are invoked and the output of the command is parsed from the backup application.
    The command called will get all possibly important information for taking a backup.
    This includes references to the backup type/name and backup mode.
    And also the start timedate of the backup for reference.

    The sample implementation below on Windows just uses xcopy (which isn't simple because xcopy isn't as flexible as I expected).
    On Linux the command line options are more flexible.

    The idea is to allow integration into backup applications (also allow snapshot backups) or offer integration point for your own type of backups.
    For example on Linux you could leverage rsync to a different location.

    What do you think of this approach? Is this what you need?


    -- Backup --

    @echo off
    SET LOGFILE=c:\nshback\log\nshbackup.log
    echo ---BACKUP DB--- >> %LOGFILE%
    echo FullFileName    : %1 >> %LOGFILE%
    echo ShortFileName   : %2 >> %LOGFILE%
    echo BackupDbRef     : %3 >> %LOGFILE%
    echo BackupNode      : %4 >> %LOGFILE%
    echo BackupName      : %5 >> %LOGFILE%
    echo BackupMode      : %6 >> %LOGFILE%
    echo BackupStartDT   : %7 >> %LOGFILE%

    xcopy /Y "%~1" "c:\nshback\backup\db\%7\%~2*" >> %LOGFILE%
    echo: >> %LOGFILE%
    echo NshBackupResult: c:\nshback\backup\db\%7\%~2
    echo NshBackupRef: TestReference
    echo Return: PROCESSED   (%~1)


    -- Restore --

    @echo off
    SET LOGFILE=c:\nshback\log\nshrestore.log
    echo ---RESTORE--- >> %LOGFILE%
    echo FullFileName    : %1 >> %LOGFILE%
    echo ShortFileName   : %2 >> %LOGFILE%
    echo BackupDbRef     : %3 >> %LOGFILE%
    echo BackupNode      : %4 >> %LOGFILE%
    echo BackupName      : %5 >> %LOGFILE%
    echo BackupMode      : %6 >> %LOGFILE%
    echo BackupStartDT   : %7 >> %LOGFILE%
    echo RestoreFileName : %8 >> %LOGFILE%
    echo DeltaFileSize   : %9 >> %LOGFILE%

    echo xcopy /Y "c:\nshback\backup\db\%7\%~2" "%~8.DAD*" >> %LOGFILE%
    xcopy /Y "c:\nshback\backup\db\%7\%~2" "%~8.DAD*" >> %LOGFILE%

    if "%9" == "0" goto skip_delta

    xcopy /Y "c:\nshback\backup\db\$7\%~2.DELTA" "%~8.DELTA*" >> %LOGFILE%

    :skip_delta

    echo: >> %LOGFILE%
    echo NshBackupResult: %~8
    echo Return: PROCESSED (%~1)


    Links

      Archives


      • [HCL Domino]
      • [Domino on Linux]
      • [Nash!Com]
      • [Daniel Nashed]