Liking cljdoc? Tell your friends :D
Clojure only.

sturdy.sqlite.backup


backup-db!clj

(backup-db! db-name
            datasource
            backup-dir
            &
            [{:keys [keep-days] :or {keep-days 30}}])

Updates SQLite query planner statistics, creates a point-in-time snapshot of the DB, and prunes old backups.

Intended to run once per day. Backup filenames have one-second timestamp precision; a second backup of the same database within one second fails because VACUUM INTO will not overwrite an existing file.

Opts: :keep-days (default: 30) - Positive number of days of backups to retain.

Updates SQLite query planner statistics, creates a point-in-time snapshot of the DB,
and prunes old backups.

Intended to run once per day. Backup filenames have one-second timestamp
precision; a second backup of the same database within one second fails
because VACUUM INTO will not overwrite an existing file.

Opts:
  :keep-days (default: 30) - Positive number of days of backups to retain.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close