mirror of
https://github.com/deajan/osync
synced 2024-11-11 07:10:40 +00:00
Initial support to resume aborted sync process.
This commit is contained in:
parent
5107cd8cd7
commit
3432ba57d6
63
osync.sh
63
osync.sh
@ -698,31 +698,30 @@ function Sync
|
|||||||
slave_delete_list
|
slave_delete_list
|
||||||
;&
|
;&
|
||||||
slave-replica-deleted-list.success|update-master-replica.fail|update-slave-replica.fail)
|
slave-replica-deleted-list.success|update-master-replica.fail|update-slave-replica.fail)
|
||||||
if [ "$CONFLICT_PREVALANCE" != "master" ]
|
if [ "$CONFLICT_PREVALANCE" != "master" ]
|
||||||
then
|
then
|
||||||
sync_update_master
|
sync_update_master
|
||||||
if [ $? != 0 ]
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
sync_update_slave
|
sync_update_slave
|
||||||
if [ $? != 0 ]
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
sync_update_slave
|
sync_update_slave
|
||||||
if [ $? != 0 ]
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
sync_update_master
|
sync_update_master
|
||||||
if [ $? != 0 ]
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
;&
|
;&
|
||||||
update-slave-replica.success|update-master-replica.success|delete-propagation-slave.fail)
|
update-slave-replica.success|update-master-replica.success|delete-propagation-slave.fail)
|
||||||
delete_on_slave
|
delete_on_slave
|
||||||
@ -742,20 +741,6 @@ function Sync
|
|||||||
echo "sync.success" > $STATE_DIR/last-action
|
echo "sync.success" > $STATE_DIR/last-action
|
||||||
}
|
}
|
||||||
|
|
||||||
function DummySync
|
|
||||||
{
|
|
||||||
# launches foo bar cuu in this order
|
|
||||||
|
|
||||||
# get last function, if last was error set err=1
|
|
||||||
|
|
||||||
# if sync.success && err=1 boo bar cuu
|
|
||||||
# set err=0
|
|
||||||
# if sync.test && err=1 bar cuu
|
|
||||||
# set err=0
|
|
||||||
# if sync.e cuu
|
|
||||||
echo merde
|
|
||||||
}
|
|
||||||
|
|
||||||
function SoftDelete
|
function SoftDelete
|
||||||
{
|
{
|
||||||
if [ "$CONFLICT_BACKUP" != "no" ]
|
if [ "$CONFLICT_BACKUP" != "no" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user