✏️ 编辑:sauvegarde
路径:
/virtual/bigbrother/public_html/edream-c.com/cr/SCRIPTS/sauvegarde
大小:501 B · 修改:2013-09-22 08:35:56 · 权限:0755 · 可写
← 返回目录
👁 查看
⬇ 下载
#!/bin/sh if [ -d DB/.git ] then # If there is a GIT repository: use it cd DB if [ $(grep -c pyc <.git/info/exclude) -eq 0 ] then echo "" >>.git/info/exclude echo "*.pyc" >>.git/info/exclude fi git add . echo "Night backup" | git commit -a --file - else # The saved data directory is hard coded here. D=$(date +'/DATA/BACKUPS/%Y/%m') mkdir -p $D tar -cvf - --exclude='*.pyc' DB/. | bzip2 -9 >$D/tomuss.$(date '+%Y-%m-%d').tar.bz2 fi 2>LOGS/xxx_backup >&2
💾 保存
取消
保存为 UTF-8,换行统一为 LF