From: Thierry Parmentelat Date: Sat, 26 Nov 2022 14:03:38 +0000 (+0100) Subject: /etc/plc.d/db dump-and-clean X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=4facb0674ab3f9e2deac6e92717b71cbd05f3c10 /etc/plc.d/db dump-and-clean --- diff --git a/plc.d/db b/plc.d/db index ccf9bf6..4d0ef8a 100755 --- a/plc.d/db +++ b/plc.d/db @@ -188,6 +188,12 @@ migrate) result "$MESSAGE" ;; +stop) + MESSAGE="Ignoring request to stop myplc databases" + dialog "$MESSAGE" + result "" + ;; + dump) MESSAGE=$"Dumping the databases in /var/lib/pgsql/backups" dialog "$MESSAGE" @@ -197,6 +203,23 @@ dump) result "$MESSAGE" ;; +clean-dump) + MESSAGE=$"Cleaning old database dumps" + dialog "$MESSAGE" + # clean_dump has a builtin default, so no problem + clean_dump $2 + result "$MESSAGE" + ;; + +dump-and-clean) + MESSAGE=$"dumping databases and cleaning old dumps" + dialog "$MESSAGE" + dump_planetlab_db + dump_drupal_db + clean_dump $2 + result "$MESSAGE" + ;; + checkpoint) MESSAGE=$"Checkpointing the databases" checkpoint_planetlab_db $2 @@ -209,22 +232,8 @@ restore) restore_drupal_db $3 ;; -clean-dump) - MESSAGE=$"Cleaning old database dumps" - dialog "$MESSAGE" - # clean_dump has a builtin default, so no problem - clean_dump $2 - result "$MESSAGE" - ;; - -stop) - MESSAGE="Ignoring request to stop myplc databases" - dialog "$MESSAGE" - result "" - ;; - *) - echo "Usage: $0 [start|migrate|dump|checkpoint|restore|clean-dump|stop]" + echo "Usage: $0 [start|migrate|stop|dump|clean-dump|dump-and-clean|checkpoint|restore]" exit 1 ;; esac