How to duplicate a live site to use as a test site

So now I'm at the point where the DB is importing but I'm now getting stuck at the "xf_data_registry."

INSERT INTO `xf_data_registry` (`data_key`, `data_value`) VALUES ('styles', 0x613a31393a7b693a32393b613a383a7b733a383a227374796c655f6964223b693a32393b733a393a22706172656e745f6964223b693a31363b733a31313a22706172656e745f6c697374223b733a31303a2232392c31362c31352c30223b733a353a227469746c65223b733a31343a22436f72652077204e6f6465204247223b733a31313a226465736372697074696f6e223b733a303a22223b733a31303a2270726f70657274696573223b733a36373338373a22613a3336353a7b733a393a22636f7265636f6c6f72223b733a353a22677265656e223b733a383a226272656164426f78223b613a31313a7b733a353a226578747261223b733a33393a226f766572666c6f773a2068696464656e3b0a7a6f6f6d3a20313b0a636c6561723a20626f74683b223b733a31333a226d617267696e2d626f74746f6d223b733a343a2231307078223b733a31313a226d617267696e2d6c656674223b733a353a222d32307078223b733a31323a226d617267696e2d7269676874223b733a353a222d32307078223b733a31303a226d617267696e2d746f70223b733a353a222d31307078223b733a363a226d617267696e223b733a32353a226d617267696e3a202d31307078202d32307078203[...]

#2006 - MySQL server has gone away
 
I always set the max post size, memory size and page timeouts to stupid amounts on localhost.... it really avoids so many errors with upgrading and also mods that ALTER user tables, thread and post tables. Obviously, a live environment needs realistic values but nothing worse than battling your own machine locally.
 
What is the best way to copy my entire live forum on different folder?
On ssh mode.

cp -R present/directory /desire/directory
cp-rf present/directory /desire/directory
cp -a present/directory /desire/directory
cp -avr present/directory /desire/directory
cp -ar present/directory /desire/directory

?

@MattW
@Slavik
 
Thanks a lot @MattW
Done ;)
Number of files: 194356
Number of files transferred: 191624
Total file size: 3.40G bytes
Total transferred file size: 3.40G bytes
Literal data: 3.40G bytes
Matched data: 0 bytes
File list size: 4.33M
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 3.41G
Total bytes received: 3.65M

sent 3.41G bytes received 3.65M bytes 10.92M bytes/sec
total size is 3.40G speedup is 1.00
 
Thanks a lot @MattW
Done ;)
This was mine onto the 2nd Linode
Code:
Number of files: 116054
Number of files transferred: 113405
Total file size: 22.67G bytes
Total transferred file size: 22.67G bytes
Literal data: 22.67G bytes
Matched data: 0 bytes
File list size: 5.24M
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 22.69G
Total bytes received: 2.17M

sent 22.69G bytes  received 2.17M bytes  26.49M bytes/sec
total size is 22.67G  speedup is 1.00
 
  • Like
Reactions: rdn
So followed this guide step by step. Hit a small snag now. After going to new test site like so "https://originalsite/test/" I can see my main forum page. Renamed it to testing and changed url to line above.

Now anytime I click a link on the test site. I receive Error page not found. For instance.
"https://originalsite/test/forums/general-discussion.2/"
The requested page could not be found.

In my opinion, it seems like the test site is not using /test/ as it's root directory. Is there anything other then the url under "Basic Board Information" that I need to change?

Any advise? Thanks in advance!
 
Figured it out. I did "cp -r" on my home directory to a new one. It did not seem to copy my hidden files. Mainly my .htaccess file and since I had "Friendly url's" turned on, the server needed the .htaccess file to work. Should of copied even the hidden files too; very odd.
 
Last edited:
Figured it out. I did "cp -r" on my home directory to a new one. It did not seem to copy my hidden files. Mainly my .htaccess file and since I had "Friendly url's" turned on, the server needed the .htaccess file to work. Should of copied even the hidden files too; very odd.
/usr/bin/rsync -aruvP --itemize-changes --human-readable --stats /current/ /target/
 
I carried out all the steps in the guide,

Database import successful.

Copied all the files from the "livesite/community" to "localhost/community" folder.

Created the same livesite db user on the local host with same ID/Password.

now when I visit "localhost/community" I am getting redirected to my "www.<livesite>.com/community" each time ..

How do I view the forum on my localhost ?
 
Top Bottom