Product SiteDocumentation Site

/root/SystemBackup

 
#!/bin/sh
SAVESET=`date -u "+HGmidland-%y%m%d.tgz"`
echo $SAVESET
cd /root
echo "/dev" >./skips
echo "/sys" >>./skips
echo "/media" >>./skips
echo "/tmp" >>./skips
echo "/var/run" >>./skips
echo "/mnt" >>./skips
echo "/opt" >>./skips
echo "/proc" >>./skips
echo "/lost+found" >>./skips
echo "/root/themes" >>./skips
echo "/root/RPMs" >>./skips
echo "*.rpm" >>./skips
echo "*gz" >>.skips
echo "/backup" >>.skips
rm -f /backup/HGm*
tar -czp --ignore-failed-read -f /backup/$SAVESET -X ./skips /
rm -f ./skips