2013/11/29

shell for Backup

#!/bin/bash
day=`date +%Y-%m-%d-%T`
backupph=/backup/$day
mkdir -p $backupph
cp -a /var/named/chroot/ $backupph
echo "Backup Finish"



------


#!/bin/bash
day=`date +%Y-%m-%d`
backupph=/media/disk/$day
mkdir $backupph
tar -czvfP $backupph/home.tgz /home
echo "Backup Finish"



TAR


tar -xzvPf filename

No comments: