Liking cljdoc? Tell your friends :D

codax.backup


make-backup-archiverclj

(make-backup-archiver compressor post-archive-callback-fn)

This returns a function for use as a :backup-fn function to an open database. It takes the generated files and bundles them into a tarball, optionally compressed, named "backup_<iso8601 timestamp>_<nanoTime unique value>". It then calls the provided callback.

Valid compressor values are:

:none - create plain .tar files :gzip - create gzip compressed .tar.gz files :bzip2 - created bzip2 compressed .tar.bz2 files :xz - created xz compressed .tar.xz files

NOTE: this functionality makes use of clojure.java.shell thus tar and/or the relevant compressor must be installed on the system or the process will fail.

Once the backup archive is created (or fails to be created) the post-archive-callback-fn will be called with the result. If creation of the tarball succeeded an :archive-path key will provide the canonical file path to the new archive. If any part of the process fails a :failure key will be present and an :err key will provide details about the failure.

This returns a function for use as a :backup-fn function to an open database. It takes the
generated files and bundles them into a tarball, optionally compressed, named
"backup_<iso8601 timestamp>_<nanoTime unique value>". It then calls the provided
callback.

Valid compressor values are:

:none - create plain .tar files
:gzip - create gzip compressed .tar.gz files
:bzip2 - created bzip2 compressed .tar.bz2 files
:xz - created xz compressed .tar.xz files

NOTE: this functionality makes use of clojure.java.shell thus tar and/or the relevant compressor
must be installed on the system or the process will fail.

Once the backup archive is created (or fails to be created) the `post-archive-callback-fn` will
be called with the result. If creation of the tarball succeeded an `:archive-path` key will provide
the canonical file path to the new archive. If any part of the process fails a `:failure` key will
be present and an `:err` key will provide details about the failure.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close