Last active
August 30, 2018 03:23
-
-
Save DogeVenci/3b721c5d5be094fa3535252c655ceb11 to your computer and use it in GitHub Desktop.
[备份并上传百度] #shell #backup #baidu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BACK_DIR="/data/discuz" | |
WORK_DIR="/root/discuz_backup" | |
discuz_DATA=discuz_$(date +"%Y%m%d").tar.gz | |
if [ ! -d $WORK_DIR ]; | |
then | |
mkdir -p "$WORK_DIR" | |
fi | |
cd $WORK_DIR | |
rm ./*.tar.gz | |
tar zcvf - $BACK_DIR |openssl des3 -salt -k 密码 |dd of=$discuz_DATA | |
./bpcs_uploader.php upload $discuz_DATA $discuz_DATA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment