JENA-1498: Fuseki backup script

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/1cb843be
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/1cb843be
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/1cb843be

Branch: refs/heads/master
Commit: 1cb843be5435a65e99538faa1f4d7eaaeee1d92d
Parents: 7f40b79
Author: Andy Seaborne <a...@apache.org>
Authored: Mon Mar 5 18:54:22 2018 +0000
Committer: Andy Seaborne <a...@apache.org>
Committed: Mon Mar 5 18:54:22 2018 +0000

----------------------------------------------------------------------
 jena-fuseki2/apache-jena-fuseki/backup        | 22 --------------
 jena-fuseki2/apache-jena-fuseki/fuseki-backup | 34 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/1cb843be/jena-fuseki2/apache-jena-fuseki/backup
----------------------------------------------------------------------
diff --git a/jena-fuseki2/apache-jena-fuseki/backup 
b/jena-fuseki2/apache-jena-fuseki/backup
deleted file mode 100755
index a3cb0b1..0000000
--- a/jena-fuseki2/apache-jena-fuseki/backup
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-DB="ds"
-
-curl -v -XPOST 'http://localhost:3030/$/sleep?interval=10000'
-
-curl -v 'http://localhost:3030/$/tasks'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/1cb843be/jena-fuseki2/apache-jena-fuseki/fuseki-backup
----------------------------------------------------------------------
diff --git a/jena-fuseki2/apache-jena-fuseki/fuseki-backup 
b/jena-fuseki2/apache-jena-fuseki/fuseki-backup
new file mode 100755
index 0000000..4a1df6b
--- /dev/null
+++ b/jena-fuseki2/apache-jena-fuseki/fuseki-backup
@@ -0,0 +1,34 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Simple backup script for Fuseki - adapt as needed.
+# You may need to set the URL for example.
+# This script trigger the backup. It does not wait for it to complete.
+# Backups are placed in the /backups/ directory.
+
+if [[ $# != 1 ]]
+then
+    echo "Usage : $(basename $0) NAME" 1>&2
+    exit 1
+fi
+
+NAME="$1"
+
+curl -XPOST "http://localhost:3030/\$/backup/${NAME}";
+
+# You can track the background task with:
+#curl 'http://localhost:3030/$/tasks'

Reply via email to