Does anyone have an easy solution for automatically backing up the database for RMS? Our clerks seem to be unable to remember to do it daily.
Thanks for any help.
Larry
Does anyone have an easy solution for automatically backing up the database for RMS? Our clerks seem to be unable to remember to do it daily.
Thanks for any help.
Larry
Larry,
You can do a .bat file and schedule it to run in the scheduled tasks OR you can download the SQL trial and only install the Enterprise Manager part. Enterprise Manager will give you the GUI for MSDE and enable you to do a scheduled maintenance plan with backup, shrink, and other tasks...
root - what would the command line need to be in the .bat file to initiate the backup process?
thanks, kev> Larry,
perfect - thank you rob
"Rob" wrote:
osql -U sa -P -S server name -Q "BACKUP DATABASE database name TO DISK 'e:\backup\back1.bck'"a.. If you have a password for the system administrator user, you must enter the password after the -P parameter. For example, insert -P password. b.. Replace server name with the name of your server. You can see the name of your server in the SQL Server Service Manager. c.. Replace database name with the actual name of your Store Operations database or Headquarters database. d.. Replace e:\backup\back1.bck with the actual path of the drive and the directory where you want to save the backup and the actual name that you want for the backup file. 2.. Save the file. 3.. Click Start, point to All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
Use Task Scheduler to run your batch file from the server. See Windows Help for more information about how to set up and how to run Task Scheduler. Important Every time that you use Task Scheduler to run your batch file, the backup file name that the batch file generates is the same file name that you entered for the path and file name when you created the batch file. Therefore, if you want to maintain a series of backup files, use one of the following methods before or after you run the backup:
a.. Move the backup file to another location. b.. Rename the backup file. Otherwise, the backup file will be appended every time that you use Task Scheduler to run the batch file. This may make the backup file unusable.
If you don't want it append the file each time use this command.
Make sue to change the paasword, computer name, etc .. to match yiur system.
OSQL -U sa -P dakota -S BackOffice -Q "BACKUP DATABASE horsin_around TO DISK = 'd:\horsin_around.bck' WITH FORMAT, STATS"
that should work perfectly thank you - don't want it to append, i simply want it to overwrite the old database on the machine. this is how we're going to do it:
- set the windows task scheduler to run this .bat file each night, making a new backup copy of the database and saving it to the store operations\dbfiles folder
- then out tape backup program on our server will pull the backup file from this location and save it to that day's backup tape
thanks, kevin
"Moe" wrote:
Rob, I have my backup working now based on your instructions, but now my stupid question is if I have a need to do a restore from this backup how do do that? I want to be prepared.
Thanks
"Rob" wrote:
Don't count on the vauge instuctions from MS. Manually back up all files is managers folders IE just in case you are starting fresh on a new computer you will need the folders with your receipt templates custom PO or tender types.
D> Rob, I have my backup working now based on your instructions, but now my
Mark,
This is from the Store Operations Adminstrator Online Help - Restoring a database'.
Rob
Or just create a .bat file with notepad and include the following:
OSQL -U sa -P dakota -S HomeOffice -q "RESTORE DATABASE horsin_around FROM DISK = 'H:\horsin_around.bck' WITH REPLACE, STATS = 5"
Of course change the parameters to match your system and database name.
Rob wrote:
Based off of all of the great ideas here, I created a small .bat file to backup the database with a 3 day alternating backup scheme and copying the database to a backroom computer as well, providing some redudant storage.
I just schedule it as a task to run at a certain time on the backroom computer (right after closing time) and it keeps the last three backups automatically. To tell what date the backup was made, just look at the file info and look at the timestamp. So far seems to work well.
Just replace the database name as well as the computer names/backup directories with what you you need (making sure the directory you're trying to save to is shared on the network).
BATCH FILE START:
::RMS Auto-backup with redundant storage
:: Checks if the other backups exist on ONE (main server) and renames them, deleting the oldest backup IF EXIST \\ONE\c\RMSBackups\RMSbackup3.bck DEL \\ONE\c\RMSBackups\RMSbackup3.bck IF EXIST \\ONE\c\RMSBackups\RMSbackup2.bck REN \\ONE\c\RMSBackups\RMSbackup2.bck RMSbackup3.bck IF EXIST \\ONE\c\RMSBackups\RMSbackup1.bck REN \\ONE\c\RMSBackups\RMSbackup1.bck RMSbackup2.bck
:: Creates the newest backup on ONE (main server) from SQL query OSQL -U sa -P 4050 -S one -Q "BACKUP DATABASE [61604] TO DISK '\\ONE\c\RMSBackups\RMSbackup1.bck'"
:: Checks if the other backups exist on Backroom (redundant storage) and renames them, deleting the oldest backup IF EXIST "\\Backroom\C on Backoffice\RMSBackups\RMSbackup3.bck" DEL "\\Backroom\C on Backoffice\RMSBackups\RMSbackup3.bck" IF EXIST "\\Backroom\C on Backoffice\RMSBackups\RMSbackup2.bck" REN "\\Backroom\C on Backoffice\RMSBackups\RMSbackup2.bck" RMSbackup3.bck IF EXIST "\\Backroom\C on Backoffice\RMSBackups\RMSbackup1.bck" REN "\\Backroom\C on Backoffice\RMSBackups\RMSbackup1.bck" RMSbackup2.bck
:: Copies the newest backup from ONE (main server) to Backroom (redundant storage) COPY /Y \\ONE\c\RMSBackups\RMSbackup1.bck "\\Backroom\C on Backoffice\RMSBackups\RMSbackup1.bck"
END OF BATCH FILE:
Also, you could just use the first half which calls the sql and have it run as a task on your register machine, which would prevent the need for the backroom computer to be on in order for the backup to initiate.
Don't know if it's useful to anyone else or not, but there it is.
~Andrew Re> Or just create a .bat file with notepad and include the following: >
I've been running backup scripts very similar to these RMS Store Ops scripts... However, they do not work for Microsoft POS. Does anyone know what batch code to use to auto backup a Microsoft POS database?
this is what I am currently using... (works fine with RMS Store Ops) del C:\BACKUP\Friday_POS.bck osql -U sa -P -Q "BACKUP DATABASE StoreDB TO DISK='C:\BACKUP\Friday_POS.bck'" xcopy c:\BACKUP\Friday_POS.bck "\\BackOffice\BACKUP" /Y
this is what it says when i try to run this script us> 1.. In Notepad, paste the following text in the new batch file: > >
xcopy c:\BACKUP\Friday_POS.bck "\\BackOffice\BACKUP" /Y
this is what it says when i try to run this script us > > thanks, > > kevin > >
Let's take it another step. How an I compress the backup file to a .zip file using the command line to save space and make it faster to copy over a VPN?
Jason
Let's take it another step. How an I compress the backup file to a .zip file using the command line to save space and make it faster to copy over a VPN?
Jason
BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.