update deploy rsync
This commit is contained in:
@@ -11,6 +11,8 @@ do
|
||||
user="${line##*=}"
|
||||
elif [ "DB_PASSWORD" == "${line%=*}" ]; then
|
||||
pass="${line##*=}"
|
||||
elif [ "RSYNC_SAV" == "${line%=*}" ]; then
|
||||
rsync="${line##*=}"
|
||||
fi
|
||||
done < "$input"
|
||||
|
||||
@@ -29,6 +31,11 @@ fi
|
||||
|
||||
mysqldump --user="$user" --password="$pass" -B "$database" > storage/logs/database/save-"$database"-"$year""$month""$day"-"$hour""$minutes".sql
|
||||
|
||||
if [ $rsync ]; then
|
||||
echo 'save by Rsync'
|
||||
rsync -avz --progress storage/logs/database/save-"$database"-"$year""$month""$day"-"$hour""$minutes".sql ssh $rsync
|
||||
fi
|
||||
|
||||
if [ "production" == "$env" ];
|
||||
then
|
||||
echo "deploy in production"
|
||||
|
||||
Reference in New Issue
Block a user