File tree 2 files changed +24
-2
lines changed
LinuxSystemOps/Filesystem
2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 34
34
# rsync task config
35
35
# ###############
36
36
SRC=" /opt/atlassian"
37
- DEST=" /backup"
38
- RSYNC_LOG_FILE=" /backup/ atlassian-rsync.log"
37
+ DEST=" /backup/my-atlassian-data " # mount backup disk to /backup
38
+ RSYNC_LOG_FILE=" /var/log/corn- atlassian-rsync.log" # create unified log dir for log file
39
39
# ###############
40
40
41
+ # TODO(DingGuodong) we can send backups to oss(object store service)
42
+
43
+ # do this ONLY once
44
+ lock_file=$SRC /.backup_lock_file # do NOT set to $DEST, make sure $DEST (backup disk) exist
45
+ if [[ ! -f $lock_file ]]; then
46
+ mkdir -p $DEST
47
+ touch $lock_file
48
+ fi
49
+
50
+ test ! -d $DEST && echo " backup dir not exist, disk is down? exit now." && exit 1
51
+
41
52
# SHELL=/bin/bash
42
53
# PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
43
54
Original file line number Diff line number Diff line change @@ -61,6 +61,17 @@ mysql_backup_dir=/backup/db/mysql
61
61
date_format_type_dir=$( date +%Y-%m-%d)
62
62
date_format_type_file=$( date +%Y%m%d%H%M%S)
63
63
64
+ # TODO(DingGuodong) we can send backups to oss(object store service)
65
+
66
+ # do this ONLY once
67
+ lock_file=$mysql_basedir /.backup_lock_file # do NOT set to $DEST, make sure $DEST (backup disk) exist
68
+ if [[ ! -f $lock_file ]]; then
69
+ mkdir -p $mysql_backup_dir
70
+ touch $lock_file
71
+ fi
72
+
73
+ test ! -d $mysql_backup_dir && echo " backup dir not exist, disk is down? exit now." && exit 1
74
+
64
75
echo " ------------------------------------------------------------------------"
65
76
echo " => do backup scheduler start at $( date +%Y%m%d%H%M%S) "
66
77
You can’t perform that action at this time.
0 commit comments