Quantcast
Channel: Installing and upgrading help
Viewing all articles
Browse latest Browse all 46784

Re: Demo site setup

$
0
0
by Sarah Jane.  

Hello Visvanath

I have finally found the time to go through your instructions on creating a demo site as above.

My demo I want is be is http://myhub.pd-hub.com

I have created 2 files

One backup.sh - one restore.sh

The backup.sh have the following in the file.

$ cp -a /home/roberygp/public_html/myhub /public_html/myhub/backup ; save the Moodle code
$ cp -a /home/roberygp/public_html/myhub/myhubdata /public_html/myhub/backup ; save the Moodle data
$ mysqldump --opt -u root -pSECRET myhubdata > /public_html/myhub/backup/myhubdata.dump ; save the database

The restore.sh has$ rm -rf /home/roberygp//public_html/myhub
$ cp -a /home/roberygp//public_html/myhub/backup/myhub /path/to
$ rm -rf /home/roberygp//public_html/myhub/myhubdata
$ cp -a //home/roberygp//public_html/myhub/backup/myhubdata /public_html/myhub
$ mysql -u root -pSECRET -e "drop database myhubdata"
$ mysql -u root -pSECRET -e "create database myhubdata default character set utf8 collate utf8_unicode_ci"
$ mysql -u root -pSECRET myhubdata < /home/roberygp//public_html/myhub/backup/myhubdata.dump

The cron is set as

/public_html/myhub/restore.sh

But I am getting a message from the cron:

/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file

Would you be able to guide me to where I have gone wrong please. x


Viewing all articles
Browse latest Browse all 46784

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>