BPWALKIN
asked on
Change backup to an incremental from full
I have the following code in a batch file to run a backup
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcm d.exe" -S rrsdb1 -E -Q "BACKUP DATABASE rrsnet TO DISK='\\rrsstore1\S\BU\Dat abases\rrs net\%times tamp%rrsne t.bak' WITH
FORMAT"
How can I change that to just do an incremental backup?
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcm
FORMAT"
How can I change that to just do an incremental backup?
ASKER
I am getting an error
It says that I do not have a "full" backup therefore no differential can be created.
So I run the full omitting " WITH DIFFERENTIAL" and then try to run again with " WITH DIFFERENTIAL" and continue to get the same error.
It says that I do not have a "full" backup therefore no differential can be created.
So I run the full omitting " WITH DIFFERENTIAL" and then try to run again with " WITH DIFFERENTIAL" and continue to get the same error.
Yeah it's because the timestamp means you have a different filename each time. The filename needs to be the same I think.
Regards,
Ady
Regards,
Ady
ASKER
I did change that when I did the full. so it is butest.bak
ASKER
did I need to wait a period of time?
Perhaps this would help you as it achieves the same thing, you can use your batch file, but it is a seemingly simpler way to do it:
http://www.sqldbatips.com/showarticle.asp?ID=27
Regards,
Ady
http://www.sqldbatips.com/showarticle.asp?ID=27
Regards,
Ady
ASKER
I see that has a better feature set. I downloaded the ExpressMaint. program where to I put the file in order for it to work properly.
You need to use the script to create the stored procedure on your database server. Is that what you were asking?
Regards,
Ady
Regards,
Ady
ASKER
The second page of the link
http://www.sqldbatips.com/showarticle.asp?ID=29
has a .exe file that allows you to run a script. I did not think you needed the SP if you use the .exe
http://www.sqldbatips.com/showarticle.asp?ID=29
has a .exe file that allows you to run a script. I did not think you needed the SP if you use the .exe
Ah OK - you use the exe file to make the commands instead of sqlcmd.exe.
expressmaint -S (local)\SQLExpress -D ALL_SYSTEM -T DB -R c:\reports -RU WEEKS -RV 1 -B c:\backups -BU DAYS -BV 1 -V
ASKER
yes- this seems more straight forward to me. Where do i save it? it does not say, do I just save it in the same dir as the script i write?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your HELP !! !
No such thing as incremental it's differential :-)
The following page will help you a lot with these commands: http://www.datasprings.com/Resources/ArticlesInformation/BackupRestoreDatabasesusingMSDE.aspx
Regards,
Ady