Verified Commit 55af2cf1 authored by Silvio Rhatto's avatar Silvio Rhatto
Browse files

Fix(sync-to-remotes): to not exclude pool data when syncing to a remote

parent 20c4abae
......@@ -57,7 +57,7 @@ RSYNC_EXCLUDES="--exclude=candidates --exclude=daemon --exclude=checkpoint.save
REMOTE_HOSTS_RSYNC="0"
# The rsync command to copy the codebase to the remote hosts
REMOTE_HOSTS_RSYNC_COMMAND="rsync -avz --delete"
REMOTE_HOSTS_RSYNC_COMMAND="rsync -avz"
# Source the project-wide environment file
if [ -e "$ENV" ]; then
......
......@@ -44,6 +44,10 @@ fi
# Iterate over all defined hosts
for host in $REMOTE_HOSTS; do
if [ ! -z "$REMOTE_HOSTS_RSYNC" ] && [ "$REMOTE_HOSTS_RSYNC" != 0 ]; then
$REMOTE_HOSTS_RSYNC_COMMAND $RSYNC_EXCLUDES $BASEDIR/ $host:$REMOTE_HOSTS_BASEDIR/
# Sync the codebase
$REMOTE_HOSTS_RSYNC_COMMAND --exclude --exclude=pools $RSYNC_EXCLUDES $BASEDIR/ $host:$REMOTE_HOSTS_BASEDIR/
# Sync the pools
$REMOTE_HOSTS_RSYNC_COMMAND $RSYNC_EXCLUDES $BASEDIR/pools/ $host:$REMOTE_HOSTS_BASEDIR/pools/
fi
done
......@@ -111,7 +111,8 @@ REMOTE_HOSTS=""
REMOTE_HOSTS_RSYNC="0"
# The rsync command to copy the codebase to the remote hosts
REMOTE_HOSTS_RSYNC_COMMAND="rsync -avz --delete"
# To not include the --delete flag, otherwise your remote pools might be overwritten by a sync
REMOTE_HOSTS_RSYNC_COMMAND="rsync -avz"
# The remote basedir where the pool is located
REMOTE_HOSTS_BASEDIR="/home/onionmine/onionmine"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment