solved Creating a sandbox copy of current site - without images - best way

Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
I am struggling with lots of small issues and I don't want to play with them on my live site.

I am happy to do another install of JR somewhere (e.g., mysite.com/sandbox/) but don't need all the content - especially the image content - to test how things work.

But I want to duplicate everything else.

What's a recommended way to go about doing this?
updated by @claygordon: 03/06/15 10:52:15AM
paul
@paul
9 years ago
4,326 posts
The easiest way to do this would be to copy your entire site to a sub-folder, copy the database to another one, edit the /data/config/config.php file accordingly, and delete the contents of the /data/cache folder. You then have a working image of your live site.
Doing that but excluding the gallery items is a bit trickier ;-)


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
More in-depth step-by-step

1) Do a clean JR install.

2) Copy over all of the files from the current install into the folder of the new install.
This is not going to be fun using cPanel - otherwise FTP down then up (now you see why I don't want to copy the images over)

3) Delete the cache files

4) Use the mySQL admin tools in cPanel to create a copy of the database.

5) Edit config.php to update the paths
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Paul:

I hate to ask for an update to the Ning Import utility, but how about a global config option to import only the first "N" records? (0 is all records.)

I could do all the testing I need, importing only, say, 250 records of each type. I could upload the entire images JSON files but only the first 260 images from the media folder.

Seems like a very useful capability to me and doesn't seem like it should be too difficult to implement.
paul
@paul
9 years ago
4,326 posts
If you're just looking for a way to populate a sandbox site, checkout the 'loader mode' option the the developer module global tab.


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Paul -

This creates profiles but does not create forums, blogs, etc?

I would need to go to random profiles and enter content manually?
updated by @claygordon: 02/03/15 03:53:57PM
paul
@paul
9 years ago
4,326 posts
I thought it created all items. Tbh its a long time since I've used it. It's late here now. I'll check it in the morning and let you know.


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Thanks -

If it does this then I am good to go when it comes to rolling up my sleeves and working on the design of a header and other aspects of the site.
paul
@paul
9 years ago
4,326 posts
Your right - the Loader mode only works with profiles. IIRC that tool was created in the early days of JR5 when we wanted to quickly build sites with many 1000s of profiles just to test the datastore performance.
So back to your original question, you could patch the importer script to only import 'N' members but then if you did the same for the other items there's no guarantee that the first 'N' blogs, say would belong to any of the 'N' members imported. You also still have to upload all the files as they are not in any order so you wouldn't know which ones belong to the first 'N' items.
If photos are the biggest issue with this, maybe just don't upload/copy the photo archive and not import them?


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
I could do a partial import.

What happens if I do the import on the entire photos JSON but only the first directory of photos is copied over - the first 1000 images? Will the script fail gracefully? I would do that as a separate import. I am not worried about orphaned images - just enough to be able to test sorting and such.
paul
@paul
9 years ago
4,326 posts
Quote: Will the script fail gracefully?
Yes - You'll get a "ERROR: photo archive file not found for . . ." message but the script will then just go on to the next one.


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Paul -

Might be a moot point as I am signing up for the JR hosting beta. One of the benefits of the program, as I understand it, is a sandbox site and I can switch between the two via the control panel.

So, as a part of the move to a JR server this would be taken care of. Unless I misunderstand.
paul
@paul
9 years ago
4,326 posts
With JR Hosting, when you create a server a JR install is automatically created at a URL something like claygorndan1.jamroomhosting.com
You can then create anoth JR install with the domain thechocolatelife.com and that will be visible at thechocolatelifecom.jamroomhosting.com
When you then point the actual domain DNS servers to jamroomhosting you can then switch the second install to its real domain.
I believe that Brian has offered to move your site over When JR hosting is fully set up, users will be able to do that themselves from the hosting control panel, so maybe if you can wait for that then you'll be able to copy the site to both JR installs, assuming it ends up working that way.


--
Paul Asher - JR Developer and System Import Specialist

Tags