Solved

Recommended process to backup and restore an Acumatica DB for testing

  • 26 July 2022
  • 6 replies
  • 696 views

Userlevel 6
Badge +3

My need: I have setup a scenario to test posting of transactions.  Once they are posted, it cannot be undone.  So, in order to test multiple times, I have been using a snapshot.  However, restoring a snapshot is pretty tedious and time consuming.  

I have SQL installed locally.  Doing a backup via SQL takes mere seconds.  Restoring a db via SQL takes seconds.

In the past, I tried restoring a sql db and it corrupted my instance of Acumatica so badly, I had to delete everything and install from scratch.  I think it might have been because I was logged into the instance when I did the restore, but I don’t know what happened.

Before I kill my environment, I want to know if any of you use SQL backup/restore to perform repetitive testing.  

This is what I think *should* work.

  1. Prepare my transactions for posting
  2. log out
  3. do a FULL sql backup
  4. login 
  5. post and look at the results.
  6. logout
  7. restore the db
  8. start over at step 4.

Any thoughts on this?

icon

Best answer by Joe Schmucker 26 July 2022, 19:08

View original

6 replies

Userlevel 5
Badge +1

@joe21  I do not think it should corrupt your instance unless if you deploy any new packages in between the step #5 and #7 which does not match with your previous website folder. 

We did this kind of testing earlier and did not find any issue.

Userlevel 5
Badge +2

@joe21 

I agree with @Vinay Koppula. A DB restore should not corrupt the instance. Should be rather seamless.
Maybe try to restart the IIS after restoring the DB (do a stop/start, rather than a regular restart)

Userlevel 6
Badge +3

i just did the steps I outlined and it works great.  Thanks all for the confirmation that this will work for me.  It will save me hours of time as I’m sure I’ll be debugging for hours.  :-)

Next, I’m going to try restoring without logging out first.  I’m early in testing so if it blows up, not a big deal.

 

Userlevel 5
Badge +1

@joe21  Great to hear that it works and gives you lot of time to test. Thanks for the confirmation. 

Userlevel 6
Badge +3

Project is DONE!  :-)  Thank you everyone.  FYI, I think this is the first project I was able to complete without asking for assistance on this forum!

Userlevel 5
Badge +1

Project is DONE!  :-)  Thank you everyone.  FYI, I think this is the first project I was able to complete without asking for assistance on this forum!

Amazing! keep up the great work and Happy coding! 😊

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved