22 lines
593 B
Plaintext
22 lines
593 B
Plaintext
|
#!/bin/bash
|
||
|
# backups all files in Windows root dir
|
||
|
#bkpdir=/root/penek4_bkp
|
||
|
#Если в последний раз smbmount не сработала
|
||
|
#rm -f $bkpdir/*.xp.tgz
|
||
|
|
||
|
#/usr/bin/fusesmb /root/smb
|
||
|
#bkpdir=/root/smb/MSHOME/BACKBONE/penek4_bkp
|
||
|
bkpdir=/root/penek4_bkp
|
||
|
##smbmount //backbone/penek4_bkp ${bkpdir} -o username=guest,password=guest
|
||
|
##sleep 5
|
||
|
|
||
|
for dir in "WINDOWS"; do
|
||
|
mv -f "$bkpdir/$dir.xp.tgz" "$bkpdir/$dir.xp.tgz~"
|
||
|
tar cvz --one-file-system -f "$bkpdir/$dir.xp.tgz" "/won/$dir"
|
||
|
rm -f "$bkpdir/$dir.xp.tgz~"
|
||
|
done
|
||
|
|
||
|
#umount /root/smb
|
||
|
##smbumount ${bkpdir}
|
||
|
#sleep 5
|