Skip to Content
Menu
This question has been flagged
2 Replies
3141 Views

Hi

I want to move a database with a website to another server and run the website from that machine.  I'm developing the webiste on the old server, but at a given point, I want to transfer it to the real server and domain and continue there.  So, I've taken a backup of the old one and restored it on the new one.

If I then connect to the new machine via the browser, it turns out that certain images (like background images in caroussels and some others, mostly coming from Unsplash) are not displaying.  Some others are displaying fine and are also coming from Unsplash (e.g. cards with a picture). 

When looking at the source view, it displays the url of the original server (external ip address).  If that old machine is still running, the images on the new one are coming through, since the source is still available; as soon as I turn the old machine off, the images on the new machine are gone and also the new server seems to respond much more slowly.  It's looking for these pics and can't find them.

Now, how can I solve this?  After doing a backup on the old machine and then a restore on the new one, 

Is there a simple way to replace all the <old url> references to the <new url> reference?  Or can I avoid that, when uploading images (from Unsplash), it uses the full url instead of simply putting /web/image/…?  Strange that some image sources are showing the full path and some aren't.  The former are creating the issue in my case.

Any ideas, anyone?

Thanks.

Avatar
Discard

Hi,

If you can open the back up in a text editor you can search and replace the IP address.

Best Answer

Hi Raf,

As I can see the encryption is on the filens store locally but not the address. You should have 2 files and one folder in to the backup zip. The dump.sql file contain the database data. If you search for a filename there you can see where is stored. If you have external source for the image the address should be there.

File from url:



Locally stored file:



* I couldn't add second answer :( in which to add pictures. Can't add pictures to comments :( So I convert answer to comment which deleted your comment  :( -

Thanks, Vasil.

Opened the zip file and everything returned was sort of encrypted.

Looking for numbers (ip addresses) will work, but what about looking for an actual domain?

Because of the encryption, you won't be able to find something like \azure.com.

Any other ideas?

Thanks.

Avatar
Discard
Author

Thanks, again, Vasil.

So, I could basically edit the dump.sql and replace the old address into the new one and save; then restore that zip? Haven't tried this, but I'll take your word for it.

Yes that should work. Just in case create a copy of your original backup so you can restore if anything goes wrong.

Related Posts Replies Views Activity
2
Jul 22
11493
2
Sep 21
7868
3
Jul 20
9953
0
Jun 23
4783
3
May 23
22996