We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d57b16 commit 0e735e9Copy full SHA for 0e735e9
entrypoint
@@ -27,9 +27,12 @@ RANCHER_CLI_VERSION="${RANCHER_CLI_VERSION:-v0.4.1}"
27
TARGET_PREFIX="/target"
28
DATA_DIRECTORY="/var/lib/mysql"
29
30
+#
31
+# Find the directory name of the latest full backup
32
33
find_last_full_backup() {
34
FILES=( $(ls -d "${TARGET_PREFIX}/"full-????-??-??-??????) )
- echo ${FILES[-1]}
35
+ basename ${FILES[-1]}
36
}
37
38
download_rancher_compose() {
@@ -204,7 +207,7 @@ backup() {
204
207
echo ""
205
208
BASE_BACKUP="$(find_last_full_backup)"
206
209
BASE_PATH="${TARGET_PREFIX}/${BASE_BACKUP}"
- NAME="full-${BASE_BACKUP}-inc-$DATE"
210
+ NAME="${BASE_BACKUP}-inc-$DATE"
211
echo "Base backup: ${BASE_BACKUP}"
212
213
fi
0 commit comments