migrate CB from one server to another

  • Venexian
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 52
  • Thank you received: 0

Venexian created the topic: migrate CB from one server to another

Hi all,
is there a utility to easily migrate Content Builder application from a server to another one without edit by hand the db tables (dataStorage, contentbuilder.forms, etc)?
My DataStorage contains over 1000 records and all of them contains fields with uploaded documents or images.
Replacing the full path of all those records would result as a BIG issue.

Thank you for any help
#183347
  • helena.dobrovic
  • helena.dobrovic's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 1510
  • Karma: 48
  • Thank you received: 129

helena.dobrovic replied the topic: migrate CB from one server to another

Hi,

Yes it is possible to do that. Actually with no difficulty at all. After you install your ContentBuilder on a new server you just need to create new Data Storage from your existing database table. (picture attached). Afterwards just continue with View and new Menu creation like you did before. Your records should be there without any problem.

Also, if you are migrating to another database is quite simple as well. Just export your table from the database and import it in the new one (SQL Format). After that the procedure it's the same as above.

Let us know if that works for you.

Kind Regards,
Helena

=========================================
Need to renew Pro Support?
Buy Here!
=========================================
Satisfied?
Consider a membership!
=========================================
Like us on Facebook
=========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
#183384
Attachments:
  • Venexian
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 52
  • Thank you received: 0

Venexian replied the topic: migrate CB from one server to another

Hi Helena,
thank you for your replay. Your way to migrate / move a running site with CB already installed can't work for me. I missed to mention that the site is on a Unix server running PHP and mySql latest rel. with Joomla 3.5.X and must be moved to a server on Linux.
I use Akeeba Backup to backup and move my sites form a server to another without any pain.
I don't need / want to reinstall Joomla and CB and the other extensions by scratch but just restore the backup to the new server and I'm done in minutes. The problem is that your solution doesn't replace the full path of the documents previously uploaded.

In the old server I have:
/usr/home/vhosts/my_domain/httpdocs/my_data_storage/
and in the new one:
/home/my_domain/public_html/my_data_storage/

The field "upload1" of the table "my_data_storage" contains /usr/home/vhosts/my_domain/httpdocs/my_data_storage/my_uploaded_file.ext and must be replaced with the new full path ( /home/my_domain/public_html/my_data_storage/my_uploaded_document.ext )

This difference afffects the download and replacement of the documents so I'm wondering if there is a utility already written that can replace the old path with the new one. The table my_data_storage contains over 1000 records! Please consider the I have up to five fields with uploaded files / documents.
Thank you and regards
V.
#183434
  • helena.dobrovic
  • helena.dobrovic's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 1510
  • Karma: 48
  • Thank you received: 129

helena.dobrovic replied the topic: migrate CB from one server to another

Hi,

Ok, I understand where is the problem then, and thank you for more information. Procedure is next:

1) Create new DataStorage and choose your exported database table (in ...or choose an existing table
.
section)

2) From your \joomla\media\contentbuilder\upload file copy all data in your new upload file on the new server.

3) In addition, what we need to do is to reconect new server path in your imported table / upload field.To do that, next step is update of a column value in your table, replacing part of a string. To be more precise, replace part of URL string which distinguishable from your old server to new server path.
You can do that with this query (adapt it if it's needed):
UPDATE prefix_yourtable SET `upload`= REPLACE(`upload`, '/usr/home/vhosts/my_domain/httpdocs/my_data_storage/', '/home/my_domain/public_html/my_data_storage/');

That will have influence on your 1000+ records at once. :)

Let us know if that works for you.

Kind Regards,
Helena

=========================================
Need to renew Pro Support?
Buy Here!
=========================================
Satisfied?
Consider a membership!
=========================================
Like us on Facebook
=========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
#183507
  • Venexian
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 52
  • Thank you received: 0

Venexian replied the topic: migrate CB from one server to another

Hi Helena,
I've decided to write my own script to recursively replace the paths in the Data Storage table (all the fields involved) and in "contentbuilder_forms.upload_directory".
I have a question though: where is written the path in the image attached? Which table.field?

Thank youand regards,
V.
#183676
Attachments:
  • helena.dobrovic
  • helena.dobrovic's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 1510
  • Karma: 48
  • Thank you received: 129

helena.dobrovic replied the topic: migrate CB from one server to another

Hi,

I apologize for late reply. The path of the image attached shoud be in your Data Storage table. It's by the name of your created Data Storage, and you can see it in the table by name given in your Data Storage upload field.

Please, let me know if this helps and if you need additional help.
Regards,
Helena

=========================================
Need to renew Pro Support?
Buy Here!
=========================================
Satisfied?
Consider a membership!
=========================================
Like us on Facebook
=========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
#183958
Moderators: tomeperica
Time to create page: 0.077 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here