xTuple.com xTupleU Blog & News Customer Support

Copy items and BOMs to new database?

Hi, I would like to create a new database with all items and bills of materials from our old database, but nothing else (no transactions). How can I do this? Is there an option to export/import products and BOMs, or do I have to copy it table-wise?

I am basically trying to achive the same as the user here: Clear transaction data from accounting modules (GL, AP) on copy of database . Any ideas?

You could use database backup tools to export just the relevant tables, then restore into the target db. Make sure you use the relevant API views as these are designed for import/export.

If you don’t want to use these tools you can export days from lists by right clicking and exporting to CSV. You can then use the xTuple supplied CSVImport application to import the CSV data back into the target db.

Make sure you test the process thoroughly first to make sure you have all the necessary fields populated. Also remember that an item also needs item site/source/tax/cost information. These must also be exported and loaded for an item to work.

Hate to do some product placement, but I will do it anyway. Professional Service hours are great for this kinda of things. People that do this kinda of things have some tools to help with doing this to a database. Can save you time and effort / end advertisement.

Thanks for the tips, I managed to export the data from the API views (using COPY (SELECT * from api.bom) TO 'api.bom.tsv' for each table). However, psql won’t let me import into a view. Do you have any idea how to import this into the api views? I also tried generating SQL commands with pg_dump, but this didn’t work with views either.

Regarding professional service, this is also something I thought about. However this branch of our company is in China and it is quite hard to find an xTuple contractor there.

You should try using the CSVImport application which xTuple supplies specifically to import data into xTuple systems. This is a much easier tool for loading a CSV file into the appropriate API view.

As Tom mentions, there is enormous experience exporting and importing data into Xtuple system by the Professional Services team. And I can personally attest to many months of professional services support for xTuple companies operating in China.