synapse.tools.service package
Submodules
synapse.tools.service.apikey module
synapse.tools.service.backup module
- synapse.tools.service.backup.backup(srcdir, dstdir, skipdirs=None)[source]
Create a backup of a Synapse application.
- Parameters:
srcdir (str) – Path to the directory to backup.
dstdir (str) – Path to backup target directory.
skipdirs (list or None) – Optional list of relative directory name glob patterns to exclude from the backup.
Note
Running this method from the same process as a running user of the directory may lead to a segmentation fault
- synapse.tools.service.backup.capturelmdbs(srcdir, skipdirs=None, onlydirs=None)[source]
A context manager that opens all the lmdb files under a srcdir and makes a read transaction. All transactions are aborted and environments closed when the context is exited.
- Yields:
Dict[str, Tuple[lmdb.Environment, lmdb.Transaction]] – Maps path to environment, transaction
- synapse.tools.service.backup.txnbackup(lmdbinfo, srcdir, dstdir, skipdirs=None)[source]
Create a backup of a Synapse application under a (hopefully consistent) set of transactions.
- Parameters:
lmdbinfo (Dict[str, Tuple[lmdb.Environment, lmdb.Transaction]]) – Maps of path to environment, transaction
srcdir (str) – Path to the directory to backup.
dstdir (str) – Path to backup target directory.
skipdirs (list or None) – Optional list of relative directory name glob patterns to exclude from the backup.
Note
Running this method from the same process as a running user of the directory may lead to a segmentation fault