Monthly Archives: June 2014

directadmin – create automaticaly all mysql database daily backup

Its useful if you are directadmin user and want to have your database copies and save them on the same hosting account as your website.

#Author: Vitalijus Ryzakovas -

current=$(date +%F)

if [ -d /home/user/databasebackup ]; then
delete=$(ls -r /home/user/databasebackup | tail -n +7 )
/bin/mkdir /home/user/databasebackup/$current
/usr/local/mysql/bin/mysqldump -u user -ppassword --all-databases > /home/user/databasebackup/$current/user_alldb.sql
[ -z "$delete" ] || rm -rf /home/user/databasebackup/$delete

Then you need create cronjob and run it everyday.

cPanel – This site has been moved to a new server

If you want return back your website to your old server, but you see this message on your website index page:

This Site Has Been Moved to a New Server.

It may be possible to restore access to this site by following these instructions for clearing your dns cache.


vi /home/username/public_html/.htaccess
#RedirectMatch \.(dynamiccontent|pl|plx|perl|cgi|php|php4|php5|php6|php3|shtml)$