代码拉取完成,页面将自动刷新
#!/bin/bash
#当前日期
today=`date "+%Y-%m-%d"`
EXCLUDEDIRS="/proc"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/sys"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/mnt"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/var/*"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/usr/share/{foomatic,backgrounds,perl5,fonts,cups,qt4,groff,kde4,icons,pixmaps,emacs,gnome-background-properties,sounds,gnome,games,desktop-directories}"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/var/*"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/data/*"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/opt/{code,goLibs,nodejs}"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/opt/{code,goLibs,nodejs}"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/root/{.vpython-root,tools,OpenMind,.cache,tools}"
EXCLUDEDIRS+=" "
EXCLUDEDIRS+="/tmp/*"
EXCLUDEDIRS+=" "
OPTIONS+="--numeric-owner"
OPTIONS+=" "
OPTIONS+="--exclude-backups"
OPTIONS+=" "
OPTIONS+="--exclude-caches-all"
OPTIONS+=" "
EXCLUDEFILES=`find /root/LIZHI/ -name core.[0-9]* -o -name *.log`
for ditem in $EXCLUDEDIRS ; do
OPTIONS+=" --exclude=$ditem "
done
for fitem in $EXCLUDEFILES ; do
OPTIONS+=" --exclude=$fitem "
done
echo "OPTIONS is $OPTIONS"
tar $OPTIONS -zcvf /mnt/CentOS7-BaseImage-$today.tar /root/LIZHI/rtc_media_sg/ /root/.bashrc /root/tools/node-v14.18.1-linux-x64/ /tmp /bin /boot /data /dev /etc /lib /lib64 /media /mnt /opt/ThirdParty/ /proc /run /sbin /srv /sys /usr /var
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。