chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5facb39
)
fixes from tests before big run
debian_version_4_1_3
author
ianmdlvl
<ianmdlvl>
Sun, 30 Jul 2006 19:04:43 +0000
(19:04 +0000)
committer
ianmdlvl
<ianmdlvl>
Sun, 30 Jul 2006 19:04:43 +0000
(19:04 +0000)
backup/snaprsync
patch
|
blob
|
history
debian/changelog
patch
|
blob
|
history
diff --git
a/backup/snaprsync
b/backup/snaprsync
index 3238f392c624af47c90ac11e315691264351a6e0..3e3391fb6ac6d3d7b933e7c8919ab25e044a4c4a 100755
(executable)
--- a/
backup/snaprsync
+++ b/
backup/snaprsync
@@
-1,7
+1,7
@@
#!/bin/bash
#
# usage: snaprsync <setting>... <positionals>
#!/bin/bash
#
# usage: snaprsync <setting>... <positionals>
-# <setting> is --
-
<name>=<value>
+# <setting> is --<name>=<value>
# <positionals> are assigned to unused mandatory values in order
# mandatory:
# rhost device mountpoint localarea
# <positionals> are assigned to unused mandatory values in order
# mandatory:
# rhost device mountpoint localarea
@@
-12,6
+12,7
@@
retcdir=/etc/chiark-backup
rvardir=/var/lib/chiark-backup
bwlimit=
retcdir=/etc/chiark-backup
rvardir=/var/lib/chiark-backup
bwlimit=
+ subdir=.
set -e
set -e
@@
-27,7
+28,8
@@
while true; do
value=${1#--*=}
case "$name" in
rhost|device|mountpoint|localarea);;
value=${1#--*=}
case "$name" in
rhost|device|mountpoint|localarea);;
- localprevious|rsharedir|retcdir|rvardir|bwlimit);;
+ localprevious|snapkind|rsharedir|retcdir|rvardir|bwlimit);;
+ subdir);;
*) badusage "unknown setting $name";;
esac
eval "$name=\$value"
*) badusage "unknown setting $name";;
esac
eval "$name=\$value"
@@
-71,6
+73,13
@@
mkfifo -m 600 $td/sentinel
exec 4<>$td/sentinel
x ssh $rhost "$sshpfx $rsharedir/snap-drop"
exec 4<>$td/sentinel
x ssh $rhost "$sshpfx $rsharedir/snap-drop"
+ssh $rhost "
+ $sshpfx
+ set -e
+ cd $rvardir
+ echo '$retcdir/snap/$snapkind drop $rvardir' >snap-drop.new
+ mv snap-drop.new snap-drop
+"
x ssh $rhost "$sshpfx $retcdir/snap/$snapkind snap $rvardir $device $mountpoint"
ssh $rhost <$td/sentinel 4<&- "
$sshpfx
x ssh $rhost "$sshpfx $retcdir/snap/$snapkind snap $rvardir $device $mountpoint"
ssh $rhost <$td/sentinel 4<&- "
$sshpfx
@@
-89,12
+98,12
@@
ssh $rhost <$td/sentinel 4<&- "
xspawned rsum
x $rsync -aHSxz --numeric-ids --delete \
${localprevious:+--link-dest} $localprevious \
xspawned rsum
x $rsync -aHSxz --numeric-ids --delete \
${localprevious:+--link-dest} $localprevious \
- $rhost:$rvardir/snap-mount/
.
$localarea/.
+ $rhost:$rvardir/snap-mount/
$subdir
$localarea/.
date -u "+ $datefmt rsyncdone"
exec 3>$localarea,lsums
(cd $localarea && \
date -u "+ $datefmt rsyncdone"
exec 3>$localarea,lsums
(cd $localarea && \
- $summer .) &
+ $summer .
>&3
) &
xspawned lsum
exec 3>&-
xspawned lsum
exec 3>&-
diff --git
a/debian/changelog
b/debian/changelog
index 70ece9a2e04f4f9923cbfdf361a37e4200b86327..e62b38efa25f8f39d4a5143e5ed6668606a3090c 100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-6,7
+6,12
@@
chiark-utils (4.1.3) unstable; urgency=low
* Restrict copy to same file system (oops!).
* Nicer messages from remountrocp (-q to mkfs; various echoes).
* Restrict copy to same file system (oops!).
* Nicer messages from remountrocp (-q to mkfs; various echoes).
- --
+ backup snaprsync fixes:
+ * Support --subdir= option, defaults to `.' (root of source fs).
+ * Correctly set up /var/lib/chiark-backup/snap-drop so drop works.
+ * Send output of local summer to fd 3 as required.
+
+ -- Ian Jackson <ian@davenant.greenend.org.uk> Sun, 30 Jul 2006 15:41:07 +0100
chiark-utils (4.1.2) unstable; urgency=low
chiark-utils (4.1.2) unstable; urgency=low