Can you move an NFS container to a different project?

So, another note here and a question. After playing with moving Anth101 to a standalone, non-cluster WordPress, I want to test my blog bavatuesdays in that environment to see if it made sense. I set it up and had an issue with rsync’ing the wp-content files from another environment on Jelastic using this command from the new WP non-cluster instance:

rsync -avz -e "ssh -p 3022" /var/www/webroot/ROOT/

I was getting the following error:

rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(543)

And this forum thread suggests it could be a file an issue with escaped characters or absolute paths, but not seeing anything. I had same issue when trying to scp from one environment to another via command line as well.

Rsyncing would be ideal, but as a temporary workaround I mounted the NFS container’s wp-content folder for the original WP Cluster to the new WP standalone environment, which worked and was awesome. And now I am wondering if there is any clean way to move an NFS container from one environment to another, or even break it out into its own instance. Could I potentially just remove everything else in that cluster save the NFS container?

Your container that you are running the rsync command in likely doesn’t have your private key installed on it. Remember with SSH keys there needs to be a private key and a public key. The private one is stored on the computer you are connecting from and the public key is stored on the computer you are connecting to. Jelastic automatically adds your public key to the containers allowing you to connect through the SSH gateway, but it does not add any private keys to any containers so in order for one container to communicate to another over ssh authentication you need to add your private key. Upload it to /root/.ssh/id_rsa on the container you are running the rsync command on and make sure the permissions are set properly with chmod 600 ~/.ssh/id_rsa

To your question of moving containers I haven’t found that a possibility yet but will look into it. You could certainly have a standalone NFS container in its own environment and use it in other environments, but you’re not saving a bunch and may lose track of whats stored where in that instance. NFS storage containers in my experience only use a single cloudlet and you’d be paying only the storage you use so I think for environments where you want detached storage it makes more sense to have a separate one for each environment.

Freaking key issue again, that’s the second time, I should be better than that. Thanks for the reminder!

OK, so work with me on this:

I cannot access the /root folder on the WordPress one-click LEMP install, but the private key was added to the DB cluster, so I am push from there to the new LEMP install:
rsync -avz -e “ssh -p 3022” /data/ROOT/wp-content/

I am logged into the container I am pushing from and the private key is in root/.ssh/ and it has proper permissions, does this rsync command look right to you? And if so, what else could I be missing?

You won’t need to, the folder you want to add the private key to is /home/jelastic/.ssh in that case. That is the home user that the gate account is using. But I wonder if you can’t use the SSH gateway method between containers. I’ll have to do some more research into that. In the short term I wonder if you assign a public IP address if you could connect that way. But there may be an easier way, you can just mount your older storage container to the new container like so:

Then you can simply copy files as if both folders are on the same server from /var/www/webroot/old-site to /var/www/webroot/ROOT

Well isn’t that brilliant, doing that right now, and saving me all sorts of hours on the FTP upload :slight_smile: I’ll report back, but seeing old-site mounted and copying wp-content now which seems to be working, so you rule the Reclaim school!

This worked brilliantly, bavatuesdays now running in a non-clustered WP environment at the tune of 8 cloudlets versus 24, so liking that a lot. Will be mindful of speed, but got me thinking this might also make sense for ds106 if MyISAM database can’t take advantage of clustered setup.

Anyway, thanks for this, being able to map the NFS like this is really useful.

1 Like