Accessing old / new site at the same time using hosts file - terminal

This is an odd request, but one I can't get my head around. We are currently building a new site on a new server, but don't want to update the DNS settings until it's ready to go, since we need a live, working site. In order to gain access to this to build it, I changed my hosts file (in Terminal) so that it would pull from that IP. Example
00.000.000.000 mywebsite.com www.mywebsite.com
The problem is, I need to import images from the old site into the new site, but since I have the hosts file setup it's not able to pull it. Any ideas of a workaround? I have multiple computers, but it needs to be done on the same computer since I need access to the backend of the new site at the exact same time of the old site, so that it can pull that image over.

Related

Move OctoberCMS website from Ubuntu VM to a CentOS 7 VM

Our web developer picked OctoberCMS to develop our new website (his skill). Unfortunately before completion he rapidly left us due to health reasons and is no longer available. His Ubuntu environment has some problems and we need it on CentOS 7 anyway. The rest of us are OctoberCMS newbies, but want to learn it.
We built a CentOS 7 VM and installed OctoberCMS and want to move his work over.
We can not find any instructions on how to "export" the work he has done thus far and import it into our new OctoberCMS.
He is using 10 plugins and 3 he developed. (I don't know if that is relevant)
Is there an easy way to do this or at least instructions?
We have been googling, youtubing, IRC'ing for a week and still at a loss.
Any help would be most appreciated.
There really isn't anything special you need to know about moving an OctoberCMS install to a new server compared to moving over any other PHP application.
I am assuming you know how to do the basics of setting up a LAMP stack, such as setting up a virtual host for the domain you want to host the site on and setting up a MySQL database and user/password to access the database. There are of course many variants on how you could accomplish this such as using a management tool like Plesk or cPanel, or just configuring the services manually via the command line.
1) Ensure your new server is running at least roughly the same version of Apache, MySQL, and PHP.
2) Copy over the directory that contains all of the web files from the old server into the document root for your domain on the new server.
3) Do a database dump from the old server and copy it to the new server. If possible, use the same database name and username and password as the old server. This way you don't have to worry about updating the configuration of the website.
4) Pull up the site and troubleshoot any errors that come up. It is helpful if OctoberCMS debug mode is on.
Following the above method will ensure that you have the exact same setup on your new server that the old server had. This will copy over all of the plugins, data, etc.
There are of course many complexities that can come up during a switch over like this, but this should at least get you started and you can come back to StackOverflow with some more specific hurdles.
Hope that helps.

Showcase website that will reinstall itself every day?

I have built a showcase Magento installation that I am about to deploy public. I'd like to give people backend access but indeed I don't want their changes to stick - not sure how to go about this. What's the best way?
I have seen a Magento showcase somewhere that gave the backend access stating the website will be renewed every 12 hours. So I suppose there is a cron job starting a script that will copy contents of one directory into the other (the public one) every 12 hours?
There are two good solutions:
1. Virtual Machine
Run the entire site in a virtual machine or VPS. Make a snapshot of the machine when it is in the state you want to reset it to. Have a cronjob that triggers the "return to snapshot" routine. The exact details vary between hosts but look for a host with an API.
2. File Copy and DB Reset
Keep a copy of all the files in another folder, together with a dump of the database. You can use mysqldump to create a database dump. You can then go back to that state by having a cronjob that removes the current folder, copies back the old folder and imports the database dump.
There are a few ways to import the database dump file, including the SOURCE command:
SOURCE dumpfile.sql;

Moving magento site from one server to another server

i have a magento site version 1.4.1.1.
And i upgraded the site to 1.7.0.2.
Now want to move the upgraded magento into another server .
How can i do this?
i planed to do this by downloading all files and upload it into new server.and import the database into the same databsae name.
If there is any problem occur when i following the above steps.
Or if there is any rules to move magento site from one server to another server?
If your sites are not publick then just move the files and db and fix base_urls on db.
If your site is live then here's a thing or two to note down on moving sites:
CODE:
this is straightforward, static assets can be moved beforehand to new server
easy enough to perform with rsync or version control or even with plain old ftp
verify file-structure and permissions
DATABASE:
this is more complicated as you have to avoid the gap of getting more orders on old server database after you have switched to move your site database you need to take our site down for the time you move your database
first step move the database to new server for testing , test if everything works
make a not of all queries you need to run to make it work on new server (base urls etc)
repeat this process when you take down the site and open the other
THE PROCESS ON CODE AND DATABASE:
add a maintenance page on your old page with proper http header
while site is down move the database to new server
open up your new site and do a short run on verifying if all works
next step is to change the domains to point to a new server
MOVING THE DOMAINS
again moving domains is a bit tricky thing as there is a possible DNS blackout that some clients will see the old site and some are seeing the new.
change your domain rules to point to a new server
clients who's DNS is not changed jet will see the maintenance page
clients who have the new DNS already will end up on moved sites
this way you can ensure that you will not get orders on both sites. If your domain-changes completely then you also need to remap your URLS to new domains for every search engine

Moving one add on website to a new cPanel host

For several years now I have freely hosted several local organizations web pages at no cost. One of those organizations wishes to move to their own server that they manage with their own server provider (alas, not A Small Orange--a little too expensive for them).
They have
a couple add on domains/websites
advanced DNS records with Google Apps
several mailing lists
a database or two
and of course their hosting directory
I was just wondering if there is a way to just export that stuff, so it can be imported in another cPanel?
OPTION ONE: One by one move all the stuff to the new host. Create the mailing lists, manually import the databases, set up the DNSs, and upload the files.
OPTION TWO: I could export the entire site, download the entire site, go to the new provider and upload it, and then delete all my content.
OPTION THREE: Is it possible to export their parts of the site, and import that to the other hosts cPanel?
Or another option all together? No email, and I don't even need the hosting history to be there (but it would be nice).
if you are moving from cpanel hosting to another cpanel hosting then just create a full backup of the website that you want to move from WHM which will backed up emails , databases , SSLs , sub domains , addon domains , everything in .tar.gz file format. Download that back up file then upload it to the new servers and restore it from WHM from Restore backup option in WHM.
OR
You can do live migration from WHM itself with Copy Accounts function from WHM which will be easier option to move the websites and the stuff.
However after migration you will need to make sure that you have assigned dedicated IPs , have configured the name servers properly ( the DNS part ) etc..
I would suggest to hire an expert to do this migration in order to avoid any possible issues.

Blobstore Images Disappearing on Google App Engine Development Server

I'm using App Engine's high performance image serving on my site, and I'm able to get everything working properly on both my local machine and in production i.e. I can upload an image and successfully display the images using get_serving_url on the blob key. However, these images don't seem to persist on my development server, i.e. after I come back from a computer restart, the images no longer show up. The development server spits out:
images_service_pb.ImagesServiceError.BAD_IMAGE_DATA
which I'm guessing is actually because the underlying blobs are no longer there (although this is just a hunch). The rest of my datastore is still intact though, as I'm using the launch setting "--datastore_path" to ensure my data persists. Is there a separate flag I need to be using to persist the blobs as well? Or is there a separate problem here that I'm missing?
You must use --blobstore_path=DIR:
--blobstore_path=DIR Path to directory to use for storing Blobstore
file stub data.
You can see all options typing dev_appserver.py --help in the command line.

Resources