HCoop
/
clinton
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9cff4d3
)
hcoop-backup: Tidy up some UUOC.
author
mwolson_admin
<mwolson_admin@deleuze.hcoop.net>
Sat, 9 Feb 2008 05:08:41 +0000
(
00:08
-0500)
committer
mwolson_admin
<mwolson_admin@deleuze.hcoop.net>
Sat, 9 Feb 2008 05:08:41 +0000
(
00:08
-0500)
hcoop-backup
patch
|
blob
|
blame
|
history
diff --git
a/hcoop-backup
b/hcoop-backup
index
70a9e64
..
45007f7
100755
(executable)
--- a/
hcoop-backup
+++ b/
hcoop-backup
@@
-15,8
+15,8
@@
PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin
#COMPRESS_PROG=bzip2
COMPRESS_EXT=.gz
COMPRESS_PROG=gzip
#COMPRESS_PROG=bzip2
COMPRESS_EXT=.gz
COMPRESS_PROG=gzip
-BWLIMIT=250
# units for BWLIMIT are KB/s
# units for BWLIMIT are KB/s
+BWLIMIT=250
IFS=$'\n'
IFS=$'\n'
@@
-39,7
+39,7
@@
function copy_over () {
if test -n "$2"; then
DEST=$DEST/$2
fi
if test -n "$2"; then
DEST=$DEST/$2
fi
-
cat $FILE |
catsync -b $BWLIMIT $DEST/$FILE
+
< $FILE
catsync -b $BWLIMIT $DEST/$FILE
rm -f $FILE
}
rm -f $FILE
}
@@
-92,8
+92,8
@@
diff allfiles debfiles | grep '^<' | cut -b 3- | \
grep -v '^/usr/share/info/dir\.old$' | \
grep -v '^/usr/share/emacs21/site-lisp/' | \
grep -v '^/usr/share/emacs22/site-lisp/' | \
grep -v '^/usr/share/info/dir\.old$' | \
grep -v '^/usr/share/emacs21/site-lisp/' | \
grep -v '^/usr/share/emacs22/site-lisp/' | \
- grep -v '^/usr/share/vim/addons/doc/tags$'
|
\
-
cat
> backupfiles
+ grep -v '^/usr/share/vim/addons/doc/tags$' \
+ > backupfiles
cat conffiles >> backupfiles
cat conffiles >> backupfiles
@@
-104,6
+104,7
@@
cat backupfiles | \
grep -v ^/var/log | \
grep -v ^/usr/lib/python2.4/ | \
grep -v ^/var/lib/python-support | \
grep -v ^/var/log | \
grep -v ^/usr/lib/python2.4/ | \
grep -v ^/var/lib/python-support | \
+ grep -v ^/usr/share/jed/lib | \
grep -v ^/usr/share/man | \
grep -v ^/usr/share/perl5/IkiWiki/Plugin | \
grep -v ^/media | \
grep -v ^/usr/share/man | \
grep -v ^/usr/share/perl5/IkiWiki/Plugin | \
grep -v ^/media | \
@@
-163,8
+164,8
@@
vos listvol deleuze | \
grep -v "\.readonly .*$" | \
sed 's_^ .*__' | \
sed 's_ .*$__' | \
grep -v "\.readonly .*$" | \
sed 's_^ .*__' | \
sed 's_ .*$__' | \
- grep '[A-Za-z]'
|
\
-
cat
> volumes
+ grep '[A-Za-z]' \
+ > volumes
cat volumes | \
grep -v not-backed-up | \
cat volumes | \
grep -v not-backed-up | \
@@
-173,7
+174,7
@@
cat volumes | \
"F={}.dump$COMPRESS_EXT.aescrypt ;
vos dump -id {} -localauth -clone |
$COMPRESS_PROG | ccrypt -k $KEYFILE -e > \$F ;
"F={}.dump$COMPRESS_EXT.aescrypt ;
vos dump -id {} -localauth -clone |
$COMPRESS_PROG | ccrypt -k $KEYFILE -e > \$F ;
-
cat \$F |
catsync -b $BWLIMIT $BACKUPDIR/$SUBDIR/\$F ;
+
< \$F
catsync -b $BWLIMIT $BACKUPDIR/$SUBDIR/\$F ;
rm -f \$F"
echo backing up databases
rm -f \$F"
echo backing up databases