For my SQL Server database, I'm trying to back it up using my code here:
sqlcmd -S servername -Q "BACKUP DATABASE [DBName] TO DISK = 'C:backup.bak'"
I mean, it's working fine but if my backup file exists, my data gets appended to the file instead of replacing it. When I try to call BACKUP DATBASE, my file grows bigger and bigger. How can I force a replacement?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!