#!/bin/sh
# Zobraz datum
date
# Pripoj disk
mount /dev/hdb /mnt/backup
# Zruseni zalohy v tempu
# Aktivuj skript
cd /tmp
php -q /a/sys/backup/do-backup.php
#echo Prejmenovavam predchozi zalohu...
#mv -f /mnt/backup/backup.tgz /mnt/backup/backup-old.tgz
# Komprese slozky
echo Kompresuji...
tar -c -z backup >/mnt/backup/backup-user.tgz
rm -r /tmp/backup
# Odpoj disk
umount /mnt/backup
# Prepnout disk do usporneho rezimu
hdparm -Y /dev/hdb
echo Done
