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:
848d86b
)
Add more directories
author
Carl N Baldwin
<cnb@hpsvcnb.fc.hp.com>
Thu, 27 Oct 2005 18:44:10 +0000
(12:44 -0600)
committer
Carl N Baldwin
<cnb@hpsvcnb.fc.hp.com>
Thu, 27 Oct 2005 18:44:10 +0000
(12:44 -0600)
scripts/drive.sh
patch
|
blob
|
history
diff --git
a/scripts/drive.sh
b/scripts/drive.sh
index 9f17f83c87688d7fab67732d9542b6ba39374793..2b758b183045dfbd7aa10dd04ce4664b44126976 100755
(executable)
--- a/
scripts/drive.sh
+++ b/
scripts/drive.sh
@@
-7,6
+7,7
@@
export PATH=$scriptsdir:$PATH
# file locations and other values
today=$(date +%Y%m%d%H%M%S)
datadir="/var/lib/backups"
# file locations and other values
today=$(date +%Y%m%d%H%M%S)
datadir="/var/lib/backups"
+backupdirs="/home /etc /var/backups /var/lib/debfoster /var/lib/mailman /var/lib/iptables /var/lib/dpkg"
tmpdir="/dev/shm/backups"
currentfiles="$tmpdir/files.db"
backupdb="$datadir/backups.db"
tmpdir="/dev/shm/backups"
currentfiles="$tmpdir/files.db"
backupdb="$datadir/backups.db"
@@
-21,7
+22,7
@@
touch $isoimage
# chmod 600 $isoimage
# Create filesystem on iso image here
# chmod 600 $isoimage
# Create filesystem on iso image here
-dd if=/dev/null of=$isoimage bs=
2048k count=0 seek=222
0
+dd if=/dev/null of=$isoimage bs=
1M count=0 seek=444
0
mke2fs -b 2048 -F $isoimage
echo "Mounting the iso image"
mke2fs -b 2048 -F $isoimage
echo "Mounting the iso image"
@@
-37,7
+38,7
@@
echo "Running find to get the status of files"
{
for type in d f l; do
findformat="$type %#m %u %g %s %CY%Cm%Cd%CH%CM%CS 0 %p\0"
{
for type in d f l; do
findformat="$type %#m %u %g %s %CY%Cm%Cd%CH%CM%CS 0 %p\0"
- find
/home
-type $type -printf "$findformat"
+ find
$backupdirs
-type $type -printf "$findformat"
done
} > $currentfiles
done
} > $currentfiles