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