Cloning an existing project

Follow these steps to recreate an existing install on another server. Essentially, you set up a new Romanesco instance first and then overwrite it with your project data.

sudo ./romanesco -12N -n 'PROJECT NAME'
sudo su - PROJECT-NAME -c bash #optional, if each install has a separate user
rm -rf .git
rm -rf _data/categories/*
mkdir temp.tmp
git clone --no-checkout [email protected]:GITLAB-USER/PROJECT-NAME.git temp.tmp
mv temp.tmp/.git .
rmdir temp.tmp
git reset --hard HEAD
Gitify package:install --all #optional
Gitify build --force

Don't forget to copy the assets folder of your original project to the new location with something like:

cp -R /old/path/to/uploads .
rsync -avP ams01:/home/ORIGINAL-PROJECT/www/uploads/ ~/Localhost/NEW-PROJECT/uploads
rsync -avP uploads/ [email protected]:/home/PROJECT-NAME/www/uploads

For those rsync commands to work, you need to add your public key to the remote (as the project user):

echo YOUR_PUBKEY_HERE >> authorized_keys

That way, file permissions will remain the same when uploading from the external source.