Change backup to an incremental from full

BPWALKIN
BPWALKIN used Ask the Experts™
on
I have the following code in a batch file to run a backup

"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe" -S rrsdb1 -E -Q "BACKUP DATABASE rrsnet TO DISK='\\rrsstore1\S\BU\Databases\rrsnet\%timestamp%rrsnet.bak' WITH

FORMAT"

How can I change that to just do an incremental backup?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Ady FootSharePoint Consultant

Commented:
BACKUP DATABASE mydata TO DISK = 'd:\backup.bak' WITH DIFFERENTIAL

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

Author

Commented:
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.

Ady FootSharePoint Consultant

Commented:
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
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Author

Commented:
I did change that when I did the full. so it is butest.bak

Author

Commented:
did I need to wait a period of time?
Ady FootSharePoint Consultant

Commented:
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

Author

Commented:
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.
Ady FootSharePoint Consultant

Commented:
You need to use the script to create the stored procedure on your database server.  Is that what you were asking?

Regards,

Ady

Author

Commented:
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
Ady FootSharePoint Consultant

Commented:
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

Open in new window

Author

Commented:
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?
SharePoint Consultant
Commented:
"Where do i save it? it does not say, do I just save it in the same dir as the script i write?"

Yes I believe that is exactly right.

Regards,

Ady

Author

Commented:
Thanks for your HELP !! !

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial