projects
/
backups
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
575a6ca
)
Only whitespace changes to fix indentation.
author
Carl N Baldwin
<cnb@plane.localdomain>
Wed, 30 Nov 2005 02:44:08 +0000
(19:44 -0700)
committer
Carl N Baldwin
<cnb@plane.localdomain>
Wed, 30 Nov 2005 02:44:08 +0000
(19:44 -0700)
scripts/restore-script.sh
patch
|
blob
|
history
diff --git
a/scripts/restore-script.sh
b/scripts/restore-script.sh
index 62042d570263fb9d5adbce2f3d5a691e80a4827f..daff5e571c414660f82e3e6d4da1c0e9de91cabd 100755
(executable)
--- a/
scripts/restore-script.sh
+++ b/
scripts/restore-script.sh
@@
-41,27
+41,27
@@
for date in $dates; do
# Check to see if files are actually needed from the current disk before requesting it.
cat $dbfile | files-from-date.sh $date | grep -z -Z -e "^${1%%/}/" > $filelist
if [ -s $filelist ]; then
# Check to see if files are actually needed from the current disk before requesting it.
cat $dbfile | files-from-date.sh $date | grep -z -Z -e "^${1%%/}/" > $filelist
if [ -s $filelist ]; then
- success=false
- while ! $success; do
- eject $device
- [ $? != 0 ] && err "Cannot eject the disk. Drive is busy. Run lsof $mountdir to see why."
- echo "Please insert backup disk: $date"
- echo "Press Enter to continue"
- read bogus
- eject -t $device
+
success=false
+
while ! $success; do
+
eject $device
+
[ $? != 0 ] && err "Cannot eject the disk. Drive is busy. Run lsof $mountdir to see why."
+
echo "Please insert backup disk: $date"
+
echo "Press Enter to continue"
+
read bogus
+
eject -t $device
- # Mount the media
- mount -t ext2 $device ${mountdir%%/}
+
# Mount the media
+
mount -t ext2 $device ${mountdir%%/}
- if grep -q $date ${mountdir%%/}/backup-status.txt; then
- success=true
- else
- echo "This doesn't seem to be the right disk."
- fi
- done
+
if grep -q $date ${mountdir%%/}/backup-status.txt; then
+
success=true
+
else
+
echo "This doesn't seem to be the right disk."
+
fi
+
done
- rsyncopts="-W -H -S -l -p -t -g -o -0 --files-from=- --stats --progress"
- cat $filelist | rsync $rsyncopts ${mountdir%%/}/ ${2%%/}/
+
rsyncopts="-W -H -S -l -p -t -g -o -0 --files-from=- --stats --progress"
+
cat $filelist | rsync $rsyncopts ${mountdir%%/}/ ${2%%/}/
else
echo "No files are needed from disk: $date. Skipping it."
fi
else
echo "No files are needed from disk: $date. Skipping it."
fi