Hi guys,
I have created this little script to backup all the important files. Have I forgot something?
Code:
echo "";
echo "************************************";
echo " ISPCONFIG BACKUP";
echo "************************************";
echo "";
echo "Wait a moment please...";
echo "1. Make a backup of /var/spool/mail";
/etc/init.d/postfix stop
cd /var/spool
tar -czf $ISPCONFIG/mail.tar.gz mail
echo "2. Copy the passwd file";
cp /etc/passwd $ISPCONFIG
echo "3. Copy the shadow file";
cp /etc/shadow $ISPCONFIG
echo "4. Copy the group files";
cp /etc/group $ISPCONFIG
echo "5. Copy the Vhosts_ispconfig.conf file";
cp /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf $ISPCONFIG
echo "6. Copy the local-host-names file";
cp /etc/postfix/local-host-names $ISPCONFIG
echo "7. Copy the postfix/virtusertable file";
cp /etc/postfix/virtusertable $ISPCONFIG
echo "8. Copy the named.conf file";
cp /var/named/chroot/etc/named.conf $ISPCONFIG
echo "9. Copy the proftpd.conf file";
cp /etc/proftpd.conf $ISPCONFIG
echo "10. Copy the proftpd_ispconfig.conf file";
cp /etc/proftpd_ispconfig.conf $ISPCONFIG
echo "11. Backup of the ISPConfig Databse";
mysqldump \
-u$USER -p$PASSWORD -h$HOST \
-Q -c -C --add-drop-table --add-locks --quick --lock-tables \
db_ispconfig | gzip --best -c > $ISPCONFIG/db_ispconfig.sql.gz;
echo "Restart Postfix"
/etc/init.d/postfix start
Regards.
Recent comments
2 days 4 hours ago
2 days 13 hours ago
2 days 16 hours ago
2 days 17 hours ago
2 days 18 hours ago
2 days 20 hours ago
2 days 21 hours ago
2 days 23 hours ago
3 days 15 hours ago
3 days 15 hours ago