Skip to main content
Solved

Recommended process to backup and restore an Acumatica DB for testing


Joe Schmucker
Captain II
Forum|alt.badge.img+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?

Best answer by Joe Schmucker

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!

View original
Did this topic help you find an answer to your question?

6 replies

Vinay Koppula
Semi-Pro II
Forum|alt.badge.img+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.


Fernando Amadoz
Jr Varsity I
Forum|alt.badge.img+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)


Joe Schmucker
Captain II
Forum|alt.badge.img+3
  • Author
  • Captain II
  • 443 replies
  • July 26, 2022

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.

 


Vinay Koppula
Semi-Pro II
Forum|alt.badge.img+1

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


Joe Schmucker
Captain II
Forum|alt.badge.img+3
  • Author
  • Captain II
  • 443 replies
  • Answer
  • July 26, 2022

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!


Vinay Koppula
Semi-Pro II
Forum|alt.badge.img+1
joe21 wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings