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

 
alt

Daniel Nashed

 

Introducing Domino Borg Backup Integration V2

Daniel Nashed  17 March 2024 11:44:52

Borg Backup
is an interesting backup option for Linux (
https://www.borgbackup.org/) and also works inside a Domino container with a local or remote repository.
The first integration with Domino Backup used bash scripts and Borg commands. But this had limitations due to the way Borg handles backups.

Each database was stored in a separate repository. I have been looking for direct integration to avoid this overhead and store all backup data into a single backup.
There is a newer option to import tar data directly into Borg as a stream ->
https://borgbackup.readthedocs.io/en/stable/usage/tar.html.

Tar is a quite old format coming from the early times and was intended to store data on taps. It still plays a major role in today's Linux environments.The tar format contains the file meta data including file permissions which can be queries.
The Borg Backup option allows to pipe multiple tar streams into a single backup.That made me coming up with a new approach which lead to this GitHub repository providing a new Domino Backup integration
-> https://github.com/nashcom/domino-borg.

There is will work in progress for more detailed documentation. Specially for special options like providing the encryption password need some review. I added multiple ways to provide the Borg repository password to not store it unprotected on disk.

But let me explain the basic idea. See the GitHub repository for details.


-- Daniel


Idea:


A small Linux program (nshborg) is started and controls the borg backup process by writing data over stdin into the Borg Backup process.

Another instance of the same program is invoked per each database and communicates with the running instance controlling the backup process.

Flow:
  • Pre Backup Script starts nshborg a "server instance" which starts the borg backup with the specified target repository
  • Domino backup brings one database after another into backup mode and invoke nshborg (client instance) to interact with the nshborg server instance
  • nshborg server instance invokes tar to get the database from stdout in tar format and pipes it to stdout of the borg process
  • nshborg client instance waits until nshborg server instance completely sent the tar stream
  • Domino backup gets control back and brings the database online
  • If a delta data occurred during backup of the database, the delta is written in the same way
  • After all databases are processed the post backup script invokes nshborg client instance to signal nshborg server instance to complete the backup.
     
Example for commands invoked:

Backup DB command:


/usr/bin/nshborg -b '/local/borg::domino-20240130124242'


Starts the backup and specifies the backup target.



Post-backup command:


/usr/bin/nshborg -q


Stops the backup and signals nshborg to stop the backup



Backup DB command:


/
usr/bin/nshborg '/local/notesdata/names.nsf'

Tells nshborg server instance to push the file to the running borg instance.



Restore Db command:


/usr/bin/nshborg -a '/local/borg::domino-20240130124242' -r '/local/notesdata/names.nsf' -t '/local/notesdata/restore/names.nsf.dad'


Restores a single database


Links

    Archives


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