Need advice on a testing / dev situation

I am not quite sure how to explain…and there may be a better way…but this is what I want to do.

I have a test laptop with MSSQL 2014 installed and SambaPOS 5.2.20
Its setup like a clone of a live location, working good.

What do I need to do to make a duplicate test setup on the same laptop to make a new menu for another location so that when the time comes I can just back up the new test, and restore it at another location?

Do I need to make a new DB on the test laptop, and then take one of my backups and restore it then start working on modifying the menu and then back that up?

It’s not recommended to do it that way. We have dbtools for exporting and importing most configs. Menus you can build via YAML and import them. As well as products and order tags etc. Config tasks can automate it.

You can also use SQL to export and import menus. But cloning databases is not recommended due to licensing.

By Licensing you mean Samba licensing correct?

The test machine is unregistered. I just want to be able to do as you do, if I remember correctly, where you can keep several development things separate using different database names.

However you can always create a fresh DB by choosing a new DB name in local settings and restoring to that.

That is what I think you have mentioned before and that is what I was thinking I could do.

Yes but for live systems I would never do that. I would start fresh and import my configs and settings with the tools I mentioned above.

Yes thats what I was meaning. I took a db backup from the tools, and imported, that way I have a pretty solid menu and configs to work from, just wanted to make edits, and back THAT up and it would be a new location.

But if it’s a brand new system then yes you can do that. I have a clone I made of my base setup and when I sell a system my hardware partner ships it with that cloned image on the hd. So my client just logs in and activates.

If I did a backup from and restored it to a test machine to capture the menu and change thibgs, it would grab and restore all the useless transactions right? How can I use an older database without all the cruft?

You can use DB Tools and clear transactions to wipe it.

1 Like

I am going to show you a neat little trick to export and import menus very quickly and easily without interrupting the integrity of a database.

Go to Reports > Data Exports and insert this code.

[DataExport:0]
@{REPORT MENU ITEM DETAILS:M.Id::|}
{REPORT MENU ITEM DETAILS:M.Name,M.GroupCode,M.Barcode.M.Tag:M.Id == $1:
- Name\: {0}
  GroupCode\: {1}
  Barcode\: {2}
  Tag\: {3}
}
{REPORT PORTION DETAILS:P.Name,P.Price:P.MenuItemId == $1:
  - Name\: {0}
    Price\: {1}:
  Portions\: {0}}
{REPORT MENU ITEM TAG DETAILS:T.Name,T.Value:M.Id==$1:
  - Name\: {0}
    Value\: {1}:
  Tags\: {0}}

When you run it you will get a txt file with formatted YAML of your entire Product List. You can then import that yaml to the new system by going to Product List click Batch Add Products and paste that YAML there.

1 Like

After you do that its simple as going to Menu and it will auto import categories and products… you can fine tune it from there.

Thank you for sharing. I will try that in a bit. Thanks