I was trying to do a cronjob on my server to automate website restore of a demo website.
This is the cronjob task i added with SSH command:
---------------------------------------------------------
sh /var/www/vhosts/mydomain.com/subdomains/restorexx.sh
---------------------------------------------------------
This is the actual file being called:
---------------------------------------------------------
mysql -u root –password=pa$$word < /var/www/vhosts/mydomain.com/subdomains/study.restore/study_.sql
rm -Rf /var/www/vhosts/mydomain.com/subdomains/study/*
cp -Rf /var/www/vhosts/mydomain.com/subdomains/study.restore/* /var/www/vhosts/mydomain.com/subdomains/study/
find /var/www/vhosts/mydomain.com/subdomains/study -type f -print | xargs chmod 644
find /var/www/vhosts/mydomain.com/subdomains/study -type d -print | xargs chmod 755
--------------------------------------------------------
I have never done this before so any advice on how to make it to work would be appreciated.
Thanks in advance!
This is the cronjob task i added with SSH command:
---------------------------------------------------------
sh /var/www/vhosts/mydomain.com/subdomains/restorexx.sh
---------------------------------------------------------
This is the actual file being called:
---------------------------------------------------------
mysql -u root –password=pa$$word < /var/www/vhosts/mydomain.com/subdomains/study.restore/study_.sql
rm -Rf /var/www/vhosts/mydomain.com/subdomains/study/*
cp -Rf /var/www/vhosts/mydomain.com/subdomains/study.restore/* /var/www/vhosts/mydomain.com/subdomains/study/
find /var/www/vhosts/mydomain.com/subdomains/study -type f -print | xargs chmod 644
find /var/www/vhosts/mydomain.com/subdomains/study -type d -print | xargs chmod 755
--------------------------------------------------------
I have never done this before so any advice on how to make it to work would be appreciated.
Thanks in advance!