sadanand48 commented on code in PR #526:
URL: https://github.com/apache/ozone-site/pull/526#discussion_r3761052477


##########
docs/05-administrator-guide/03-operations/16-backup-and-recovery/om-metadata-backup.sh:
##########
@@ -0,0 +1,236 @@
+#!/usr/bin/env 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.
+#
+# Download a consistent OM metadata checkpoint tarball from the leader OM 
HTTP(S)
+# endpoint, including bucket snapshot RocksDB state. Handles multi-batch 
transfers
+# when snapshot SST data exceeds ozone.om.ratis.snapshot.max.total.sst.size.
+#
+# See om-metadata-backup.md in this directory for prerequisites and restore 
notes.
+
+set -euo pipefail
+
+readonly COMPLETE_SENTINEL='OZONE_RATIS_SNAPSHOT_COMPLETE'
+readonly HARDLINK_FILE='hardLinkFile'
+readonly DEFAULT_ENDPOINT='v2/dbCheckpoint'
+readonly QUERY='includeSnapshotData=true&flushBeforeCheckpoint=true'
+
+usage() {
+  cat <<'EOF'
+Usage: om-metadata-backup.sh [options] --base-url URL

Review Comment:
   I feel we could add a java based tool itself instead of adding bash code. I 
don't see the hardlink construction logic here and we could re-use the existing 
code that follower uses to construct the db from the tar



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to