- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2022 01:55 PM
Hello everyone,
I want to multiply the my instance - table, columns, script, forms But not the data
another problem - my instance not connected to the internet.
and the destination instance not connect to source instance (I need a solution using files)
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 06:31 PM
Hello Lion,
The simplest, unfortunately time consuming (first time you do it), way is using mysqldump (mariadb-dump) utility and leveraging it's "--no-data" and "--no-create-info" variables.
The mysqldump documentation can be found here: https://mariadb.com/kb/en/mariadb-dumpmysqldump/
You would do mysqldump with --no-data variable for entire schema this will preserve entire structure - so you'd have all tables and columns in the target instance.
And you would do another mysqldump or series of them with --no-create-info for all the tables except those you want to leave empty. Be careful when you are choosing to skip any of the tables though. As there are thousands of tables this can take some time to identify 90% of what you could leave empty. To simplify this process I recommend you start by tables well known to you (e.g. you have table u_my_records containing some very important records you have made in production then you know you can empty it), then follow it up with largest tables (both by size and number of records) and so on. I suggest you leave all of the system or unclear tables as are. The only exception I can think of would be user tables, and attachments. For some table hierarchies you can also simplify by using wildcards to skip children tables as well.
When you are satisfied with the list you make thos dumps, import them to target DB, follow the remaining steps needed for self-hosted cloning (e.g. disabling some properties or chaning instance id,name) and you should have the instance almost as you wanted.
You can cleanup remaining data either through the application (e.g. system tables) or in case you still find large table that can be completely emptied, you can truncate it via DB host.
If you retain your filters, next copy should be cleaner and a lot faster.
I hope this helps.
Matyas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2022 07:53 PM
Hi @Lion Kesler ,
First of all you need internet, else how are you suppposed to start the connection!!
Lets say you have a source instance as (https://source.servicenow.com)
And a target instance as (https://target.servicenow.com)
Step#1: To create a Clone Target, Login into your instance which needs to be cloned.
Navigate to System Clone > Clone Targets. Click New.
Create a new record like:
Step#2: To start the clone process
Navigate to System Clone > Request Clone.
Select a Target instance to receive the cloned data.
Step#3: Confirmation message you would see:
Step#4: Check the clone progress (System Clone > Active Clones and select a request):
MOST IMPORTANT: Be careful about your source & target instance, you would always go to sourcing instance to make a clone instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2022 09:01 PM
Hi
There is no communication between the Instances’
They are in two different domain and can not be connected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2022 10:27 PM
Please see if this helps:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0752547
(You need to have a valid HI/Support account to view this article.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2022 04:23 AM
The solution you have given me copies all of the tables and the data inside, I just want the tables with NO data inside