File tree Expand file tree Collapse file tree 6 files changed +27
-127
lines changed
Expand file tree Collapse file tree 6 files changed +27
-127
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # System variables
4- BUCKET=s3://finanssoreal/database/
5-
6- OBJECT=" $( aws s3 ls $BUCKET | sort | tail -n 1 | awk ' {print $4}' ) "
7- FULL_PATH=" $HOME /$OBJECT "
8-
9- aws s3 cp " $BUCKET$OBJECT " " $FULL_PATH "
10- gunzip $FULL_PATH
11-
12- # UPDATE full path
13- FULL_PATH=" ${FULL_PATH% .gz} "
14-
15- if [[ " $1 " == " -fixsql" ]]; then
16- sed -i ' s/DEFINER=`forge`@`%`/DEFINER=`finanssoreal`@`%`/g' $FULL_PATH
17- fi
18-
19- if [[ " $2 " == " -fixutf8" ]]; then
20- sed -i ' s/utf8mb4_0900_ai_ci/utf8_general_ci/g' $FULL_PATH
21- fi
22-
23- echo " Dump descargado correctamente en $FULL_PATH "
3+ DOCKER_IMAGE=" finanssoreal/db-helper:latest"
4+ MARIA_DATA=" $HOME /maria-data"
5+ AWS_HOME=" $HOME /.aws"
6+
7+ # create the base directories
8+ mkdir -p " $MARIA_DATA " && mkdir -p " $AWS_HOME "
9+
10+ # insert dump into database
11+ podman run --rm -it \
12+ -v $MARIA_DATA :/etc/maria-data \
13+ -v $AWS_HOME :/root/.aws \
14+ --network=host $DOCKER_IMAGE download
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ DOCKER_IMAGE=" finanssoreal/db-helper:latest"
4+ MARIA_DATA=" $HOME /maria-data"
5+ AWS_HOME=" $HOME /.aws"
6+
7+ # create the base directories
8+ mkdir -p " $MARIA_DATA " && mkdir -p " $AWS_HOME "
9+
10+ # download a dump from the database
11+ podman run --rm -it \
12+ -v $MARIA_DATA :/etc/maria-data \
13+ -v $AWS_HOME :/root/.aws \
14+ --network=host $DOCKER_IMAGE insert
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /bin/bash
2+
23iptables -P INPUT ACCEPT
34iptables -P FORWARD ACCEPT
45iptables -P OUTPUT ACCEPT
You can’t perform that action at this time.
0 commit comments