We use the backup software to back different environments. I would like to be able schedule a restore just like a backup.
This would allow me to move production data to test environment automatically.
If this is already available, I can’t find it.
We use the backup software to back different environments. I would like to be able schedule a restore just like a backup.
This would allow me to move production data to test environment automatically.
If this is already available, I can’t find it.
Hi Chris,
Sorry, but there is no such option in SQLBackupAndFTP, we can recommend you to create a restore job and run it via Command Prompt using Windows Scheduler. Here are more details on how to run a backup job via Command Prompt https://sqlbackupandftp.com/blog/run-sqlbackupandftp-v11-command-line To run a restore job just use the following command:
SqlBak.Job.Cli.exe -runJob -jobName "Job"
Also, you can try our another product - SqlBak https://sqlbak.com/ it allows you to add a restore process to your backup job, just set an appropriate settings at the “Restore on another computer” section.
Hi
i used the command line but i got this error
10/17/2019 12:38:35 PM [Error] Failed to restore laundry_db database. Access to the path ‘C:\WINDOWS\system32\laundry_db20191017123057c618b1-7602-4acb-bef3-faefdaeaa209.sql’ is denied.
i changed the temporary folder setting in the job but it is not reflecting
THIS IS THE FULL REPORT
10/17/2019 10:05 AM Connecting to MySQL Server: (5.6.41-84.1). domain.biz
10/17/2019 10:05 AM Connecting to FTP destination “ftp.domain.biz”
10/17/2019 10:05 AM Searching files by mask “laundry_db*”
10/17/2019 10:05 AM Found “4” files.
10/17/2019 10:05 AM Restoring “widetech_landdb” database on “Thursday, October 17, 2019 12:57 PM” from backup of “laundry_db” database
10/17/2019 10:05 AM Downloading file “laundry_db201910171257.zip” to “F:\temp_upload\Pranas.NET\SQLBackupAndFTP\backup\0f4ba1c3-01ed-4622-b7b3-a9204e801495”
10/17/2019 10:05 AM Uncompressing “F:\temp_upload\Pranas.NET\SQLBackupAndFTP\backup\0f4ba1c3-01ed-4622-b7b3-a9204e801495\laundry_db201910171257.zip” file with Internal archiver.
10/17/2019 10:05 AM Restoring “widetech_landdb” database from files: “laundry_db201910171257.sql”
10/17/2019 10:05 AM Failed to restore laundry_db database. Access to the path ‘C:\WINDOWS\system32\laundry_db201910171257c73153e0-a3ce-42dc-b6ec-690b9e4062d2.sql’ is denied.
10/17/2019 10:05 AM Disconnecting from FTP destination “ftp.domain.biz”
10/17/2019 10:05 AM Job “restore1” finished with “1” errors
Hi Sayed_Mohamed_Ameen,
Thank you for the details, please give us some time to check the issue.
Sorry for the inconvenience.
Anything Happened regarding this issue?
Hi Sayed_Mohamed_Ameen,
It seems this issue related to your user permission settings. Could you please try to run the following command:
SqlBak.Job.Cli.exe -runJob -jobName “Job”
from behalf of the user that has enough rights?
Sorry for the inconvenience.