Skip to content

Commit 08b8688

Browse files
committed
backup dump script
1 parent 12ecbb1 commit 08b8688

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

dump.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
export TZ=C
3+
#set -e
4+
5+
BASE=$1
6+
if [ -z "$BASE" ]; then
7+
echo "dump.sh BASE [DIR]"
8+
echo ""
9+
echo "Example:"
10+
echo " dump.sh https://view.commonwl.org/ /var/backups/"
11+
exit 1;
12+
fi
13+
14+
DIR=$2
15+
if [ -z "$DIR" ]; then
16+
DIR=`pwd`
17+
fi
18+
19+
URL="${BASE}/workflows.json?page=0&size=100000000"
20+
FILE=${DIR}/`date --iso-8601=seconds | sed s/://g`.json
21+
curl --silent --show-error --output $FILE $URL
22+
gzip $FILE
23+
echo $FILE

0 commit comments

Comments
 (0)