File tree 3 files changed +6
-2
lines changed 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
# It will take backup, compress, encrypt and push it
7
7
8
- export PATH= " /percona-xtrabackup-8.0.35-30-Linux-x86_64.glibc2.17/bin: $PATH "
8
+ . /etc/environments.sh
9
9
10
10
TARGET_DIR=" /xbackup"
11
11
FINAL_DIR=" $TARGET_DIR /final"
Original file line number Diff line number Diff line change @@ -51,4 +51,7 @@ echo "${CRON_TIME} bash /usr/local/bin/backup.sh >> /var/log/cron.log 2>&1" > /e
51
51
chmod 0644 /etc/cron.d/backup-cron
52
52
crontab /etc/cron.d/backup-cron
53
53
54
+ export PATH=" /percona-xtrabackup-8.0.35-30-Linux-x86_64.glibc2.17/bin:$PATH "
55
+ printenv | awk -F= ' {print "export " $1"=\""$2"\""}' >> /etc/environments.sh
56
+
54
57
exec cron -f
Original file line number Diff line number Diff line change 2
2
3
3
# It will fetch and decompress the xbackup from the s3
4
4
5
+ . /etc/environments.sh
6
+
5
7
S3_TARGET_DIR=" xbackup"
6
8
TARGET_DIR=" /xbackup/recovery"
7
9
COMPRESS_EXT=" .tar.zst"
8
10
LATEST_BACKUP_TXT=" latest_backup.txt"
9
11
10
- export PATH=" /percona-xtrabackup-8.0.35-30-Linux-x86_64.glibc2.17/bin:$PATH "
11
12
12
13
extract_backup () {
13
14
local filename=" $1 "
You can’t perform that action at this time.
0 commit comments