new feature
This commit is contained in:
@@ -4,6 +4,8 @@ dir="$(dirname "$0")"
|
|||||||
# FTP server details
|
# FTP server details
|
||||||
LOCAL_DIR="/backup"
|
LOCAL_DIR="/backup"
|
||||||
|
|
||||||
|
mkdir -p "$LOCAL_DIR"
|
||||||
|
|
||||||
keys=$(cat $dir/$2.yml | yaml2json - | jq '.volumes' | jq -r 'keys[]')
|
keys=$(cat $dir/$2.yml | yaml2json - | jq '.volumes' | jq -r 'keys[]')
|
||||||
|
|
||||||
files=()
|
files=()
|
||||||
@@ -22,6 +24,6 @@ if [ "$3" = "--print-timestamp-only" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
base_url="https://$1.stakesquid.eu/backup/"
|
base_url="$1"
|
||||||
aria2c -d "$LOCAL_DIR" "${files[@]/#/$base_url}"
|
aria2c -d "$LOCAL_DIR" "${files[@]/#/$base_url}"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
curl -s $1 | grep -oP 'rpc_[^"]*\.tar\.zst' | sort -u
|
||||||
curl -s https://$1.stakesquid.eu/backup/ | grep -oP 'rpc_[^"]*\.tar\.zst' | sort -u
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ if [ ! -d "$volume_dir" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -v $3 ]]; then
|
||||||
|
$dir/clone-backup.sh $3 $1
|
||||||
|
fi
|
||||||
|
|
||||||
calculate_required_space() {
|
calculate_required_space() {
|
||||||
# Extract the size from the filename
|
# Extract the size from the filename
|
||||||
size=$(echo "$1" | grep -oE '[0-9]+G')
|
size=$(echo "$1" | grep -oE '[0-9]+G')
|
||||||
|
|||||||
Reference in New Issue
Block a user