Browse Source

implement restore-from-snapshot function in snapshot package.

stable
Craig Oates 2 years ago
parent
commit
45dc9fc645
  1. 6
      src/snapshot.lisp

6
src/snapshot.lisp

@ -29,8 +29,10 @@ user can repopulate that database after they have restored this website. The
(defun restore-from-snapshot (snapshot-name) (defun restore-from-snapshot (snapshot-name)
"Deletes the data in /storage and the DB and replaces it with `SNAPSHOT-NAME'." "Deletes the data in /storage and the DB and replaces it with `SNAPSHOT-NAME'."
(format t "RESTORE-FROM-SNAPSHOT NOT IMPLEMENTED.")) (storage:remove-raw-directory "storage/")
(storage:remove-raw-directory "db/")
(storage:copy-raw-directory (format nil "snapshots/~a/storage/" snapshot-name) "storage/")
(storage:copy-raw-directory (format nil "snapshots/~a/db/" snapshot-name) "db/"))
(defun delete-snapshot (snapshot-name) (defun delete-snapshot (snapshot-name)
"Deletes the snapshot in the /snapshots directory with `SNAPSHOT-NAME'." "Deletes the snapshot in the /snapshots directory with `SNAPSHOT-NAME'."

Loading…
Cancel
Save