projects
/
backups
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of home:dvl/backup
[backups/.git]
/
scripts
/
drive.sh
diff --git
a/scripts/drive.sh
b/scripts/drive.sh
index 7d0420dcf3651334fb0d5158dddf367c83bd7071..367016c57c56c00df1d94b6d09c9d1b905530175 100755
(executable)
--- a/
scripts/drive.sh
+++ b/
scripts/drive.sh
@@
-8,6
+8,7
@@
export PATH=$scriptsdir:$PATH
today=$(date +%Y%m%d%H%M%S)
mailto='carl@ecbaldwin.net'
datadir="/var/lib/backups"
today=$(date +%Y%m%d%H%M%S)
mailto='carl@ecbaldwin.net'
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"
@@
-22,7
+23,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"
@@
-38,7
+39,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