diff --git a/src/snapshot.lisp b/src/snapshot.lisp index b2d8f82..75b11ac 100644 --- a/src/snapshot.lisp +++ b/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) "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) "Deletes the snapshot in the /snapshots directory with `SNAPSHOT-NAME'."