标签:repos 路径 仓库 parent tar repo date mkdir nba
#!/bin/bash
SRCPATH=/data/svnrepos/softdev/; #定义仓库parent路径
DISTPATH=/data/svnbak/full/`date +%Y%m%d%H%M`/ ; #定义存放路径;
DISTPATH2=/data/svnbak/tar/
mkdir -p $DISTPATH
echo $DISTPATH
svnadmin hotcopy $SRCPATH $DISTPATH
tar -zcPvf $DISTPATH2/$(date +%Y%m%d%H%M).tar.gz $DISTPATH
cd /data/svnbak/full/
rm -rf /data/svnbak/full/*
cd $DISTPATH2
find $DISTPATH2/ -mtime +3 -name "*.tar.gz" -exec rm -rf {} \;
标签:repos 路径 仓库 parent tar repo date mkdir nba
原文地址:https://www.cnblogs.com/kylingx/p/12188741.html