Reply

Small cmd script to backup your databank findings!

5 replies

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

7 years ago #116372

This is a small cmd script to backup your databank findings! – credit for help goes to @rng from our Slack group,

 

Follow these steps:

¢ Create a notepad file

¢ Edit the notepad file and put these lines into it:

 

– If you running just one instance of SQ use this line of code and change the C:\SQ\temp\BuildStrategy\databank” to your SQ folder destination, you will need to change only the C:\SQ do NOT change the \temp\BuildStrategy\databank.

– Then change the backup folder destination where all your databank files will be saved by changing the “D:\SQ BACKUP\SQ” to where ever you want, i would suggest any other drive-disk other then “C:\” because that’s the whole purpose of backing up our findings, because if your system will crash or something will happen your system will try to restore your last saved windows sesion via Windows Restore, and your system will go back in time and you will lose all your findings*!, thats why we are backing up…!

xcopy "C:\SQ\temp\BuildStrategy\databank" "D:\SQ BACKUP\SQ" /y /c /i /q

– If you running multiple instances of SQ use as follows:

xcopy "C:\SQ\temp\BuildStrategy\databank" "D:\SQ BACKUP\SQ" /y /c /i /q
xcopy "C:\SQ #2\temp\BuildStrategy\databank" "D:\SQ BACKUP\SQ #2" /y /c /i /q
xcopy "C:\SQ #3\temp\BuildStrategy\databank" "D:\SQ BACKUP\SQ #3" /y /c /i /q
xcopy "C:\SQ #4\temp\BuildStrategy\databank" "D:\SQ BACKUP\SQ #4" /y /c /i /q
xcopy "C:\SQ #5\temp\BuildStrategy\databank" "D:\SQ BACKUP\SQ #5" /y /c /i /q

(Always use the ” ” when choosing the directories)

 

¢ Save as .bat file and you ready to go, each few hours just in case double click this file and backup your findings, you can also create an Automatic Backup trick with the Windows Task Scheduler so that the script we created will run automatically every X amount of time 🙂

 

 

 

*Almost forgot!

– if you do stumble upon a system crash and you want to recover all of your backup files in a click of a button, follow these steps:

 

we’ll do all the steps above just in reverse!, you will make another notepad and just switch the distanations in the code line/s,

for example:

to back up we use:

xcopy "C:\SQ\temp\BuildStrategy\databank" "D:\SQ BACKUP\SQ" /y /c /i /q

and in order to recover we will use:

xcopy "D:\SQ BACKUP\SQ" "C:\SQ\temp\BuildStrategy\databank" /y /c /i /q

just switch the distentions and that’s it, done, run this “recovery” script .bat file when your system crashed and you will be recovered safely 🙂

 

Here are links with my personal examples of a “Backup” & “Recovery” .bat script files that i currently use, if you would like to check them out or edit them please do so:

https://ufile.io/ea0171

 

Enjoy and keep it safe! 🙂

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #141674

Thanks for this. It is helpful. Also the Windows Task Scheduler could be used to run this regularly

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

7 years ago #141690

Ohh yeah thats what i thought :), problem is that every-time i run this script i have to confirm if i want to replace the already existing files with the files that i want to copy to the folder im saving to,

 

so i need to choose YES/NO/ALL,

 

so i need to phisicly press the “A” key to confirm the operation…, can somebody maybe help me with that? i want that it will be automatically confirmed and replace all as if i press the “A” key to confirm it.

 

thanks! – will update the post with the updated info, with a “Windows Task Scheduler” guide as well 

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

7 years ago #141698

updated.

0

RNG

Subscriber, bbp_participant, community, 9 replies.

Visit profile

7 years ago #141699

you’re welcome  B)

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

7 years ago #141700

code was updated to gain more speed of process. 

0

Viewing 5 replies - 1 through 5 (of 5 total)