added script lol

master
cheetah 2 years ago
parent 1b31722113
commit 50f0712b0e

@ -0,0 +1,33 @@
#!/bin/bash
export ARANGO_ROOT_PW=""
dddd=$(date +"%Y_%m_%d_%H%M")
export dddd
mkdir -p ./borg
mkdir -p ./backups
backup() {
db=$1
nn=$2
mkdir -p data
rm -rf ./backups/$nn
arangodump --server.database $db --server.username "root" --server.password "$ARANGO_ROOT_PW" --output-directory ./backups/$nn
#rm $nn.tar.zst
cd ./backups/$nn
/usr/local/bin/borg create -s ./borg/$nn/::$dddd .
#tar cvf $nn.tar /root/backups/$nn --strip-components=1
#zstd --rm $nn.tar
cd ../../
rm -rf ./backups/$nn
#mv $nn.tar.zst data/$nn/$nn_$dddd.tar.zst
#mv $nn.tar data/$nn/$nn_$dddd.tar
}
backup yt yt
backup cdynbot cdynbot
backup cgifsbot cgifsbot
rclone copy ./borg/ backup:arango/borg --progress --bwlimit 250k
Loading…
Cancel
Save