mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-21 17:55:05 +00:00
Removed unneeded single quotes.
This commit is contained in:
parent
f90feebaae
commit
a1c0d6f0ae
20
backup.sh
20
backup.sh
@ -79,7 +79,7 @@ populate_datasets()
|
||||
list_datasets()
|
||||
{
|
||||
for dataset in $SEND_DATASETS; do
|
||||
dataset=`echo $dataset|cut -d':' -f1`
|
||||
dataset=`echo $dataset|cut -d: -f1`
|
||||
zfs list -H $dataset
|
||||
done
|
||||
}
|
||||
@ -96,13 +96,13 @@ list_remote_datasets() {
|
||||
if [ $BG_TEST_MODE = "TRUE" ]; then
|
||||
echo ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr\
|
||||
"sh -c 'for dataset in $SEND_DATASETS; do
|
||||
dataset=`echo \\$dataset|cut -d':' -f2`
|
||||
dataset=`echo \\$dataset|cut -d: -f2`
|
||||
zfs list -H $zroot\$dataset;
|
||||
done'"
|
||||
else
|
||||
ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||
"sh -c 'for dataset in $SEND_DATASETS; do
|
||||
dataset=`echo \\$dataset|cut -d':' -f2`
|
||||
dataset=`echo \\$dataset|cut -d: -f2`
|
||||
zfs list -H $zroot\$dataset;
|
||||
done';"
|
||||
fi
|
||||
@ -130,7 +130,7 @@ get_latest_remote_snapshot()
|
||||
zfs_allow_origin()
|
||||
{
|
||||
for dataset in $SEND_DATASETS; do
|
||||
dataset=`echo $dataset|cut -d':' -f1`
|
||||
dataset=`echo $dataset|cut -d: -f1`
|
||||
if [ $BG_TEST_MODE = "TRUE" ]; then
|
||||
echo zfs allow -u $LOCAL_USER $ORIGIN_PERMS $dataset
|
||||
else
|
||||
@ -152,13 +152,13 @@ zfs_allow_mirrors()
|
||||
if [ $BG_TEST_MODE = "TRUE" ]; then
|
||||
echo ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||
"for dataset in $SEND_DATASETS; do
|
||||
dataset=`echo \\$dataset|cut -d':' -f2`
|
||||
dataset=`echo \\$dataset|cut -d: -f2`
|
||||
zfs allow -u $user $MIRROR_PERMS $zroot\$dataset
|
||||
done"
|
||||
else
|
||||
ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||
"for dataset in $SEND_DATASETS; do
|
||||
dataset=`echo \\$dataset|cut -d':' -f2`
|
||||
dataset=`echo \\$dataset|cut -d: -f2`
|
||||
zfs allow -u $user $MIRROR_PERMS $zroot\$dataset
|
||||
done"
|
||||
fi
|
||||
@ -188,8 +188,8 @@ send_latest()
|
||||
esac
|
||||
fi
|
||||
for dataset in $SEND_DATASETS; do
|
||||
dataset="`echo $dataset|cut -d':' -f1`"
|
||||
remote_dataset="`echo $dataset|cut -d':' -f2`"
|
||||
dataset="`echo $dataset|cut -d: -f1`"
|
||||
remote_dataset="`echo $dataset|cut -d: -f2`"
|
||||
debug "Processing $dataset (remote $remote_dataset)."
|
||||
origin_snapshot=`get_latest_snapshot $dataset`
|
||||
if [ $BG_TEST_MODE = "TRUE" ]; then
|
||||
@ -219,8 +219,8 @@ send_increment()
|
||||
esac
|
||||
fi
|
||||
for dataset in $SEND_DATASETS; do
|
||||
dataset="`echo $dataset|cut -d':' -f1`"
|
||||
remote_dataset="`echo $dataset|cut -d':' -f2`"
|
||||
dataset="`echo $dataset|cut -d: -f1`"
|
||||
remote_dataset="`echo $dataset|cut -d: -f2`"
|
||||
origin_snapshot=`get_latest_snapshot`
|
||||
remote_snapshot=`get_latest_remote_snapshot`
|
||||
if [ $BG_TEST_MODE = "TRUE" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user