标签:create date tar -zcvf gitlab tool als script links rip
redis是一款非关系型数据库
[root@izj6c19rqdk7mfnm5seocuz ~]# ls a.txt backup_gitlab.sh ossutil P [root@izj6c19rqdk7mfnm5seocuz ~]# cat backup_gitlab.sh #!/bin/bash BACKUP_FILE_NAME="gitlab_config_$(date -I).tar.gz" find "/var/opt/gitlab/backups/" -name "*.tar" -type f -exec rm -rf {} \; /usr/bin/gitlab-rake gitlab:backup:create backfile=$(find /var/opt/gitlab/backups -type f -mtime -1 -name ‘*.tar‘) tar -zcvf /tmp/${BACKUP_FILE_NAME} /etc/gitlab /root/ossutil cp ${backfile} oss://doo-hk-backups/gitlab/ /root/ossutil cp /tmp/${BACKUP_FILE_NAME} oss://doo-hk-backups/gitlab/ rm /tmp/${BACKUP_FILE_NAME} [root@izj6c19rqdk7mfnm5seocuz ~]#
标签:create date tar -zcvf gitlab tool als script links rip
原文地址:https://www.cnblogs.com/hujinzhong/p/11403302.html