We help IT Professionals succeed at work.

Does the stsadm -o backup replace the file?

gtrapp
gtrapp asked
on
Hi,

I am using stsadm command to create backup file of my WSS 3.0 SharePoint site content.

stsadm.exe -o backup -url http://sharepoint_site-filename "y:\SQL-Backups\SP2007\server_stsadmin_backup.bak"

With this command, will it replace the file, or do I need to pass other parameters to have stsadm just write over the existing one?
Comment
Watch Question

Justin SmithSr. System Engineer
Top Expert 2012

Commented:
You need to pass the -force parameter
Justin SmithSr. System Engineer
Top Expert 2012
Commented:
Sorry, if you are doing a farm level backup, use -force.  If you are using a site level, use -overwrite.

Author

Commented:
At the site level only Something like this:

stsadm.exe -o backup -url http://sharepoint_site-filename "y:\SQL-Backups\SP2007\server_stsadmin_backup.bak" -overwrite
Sr. System Engineer
Top Expert 2012
Commented:
Yup, you got it.  That will overwrite the existing .bak.

Author

Commented:
A follow up question: What if WSS 3.0 fails during the backup process? In the folder, there will be an existing BAK file, a backup from the night before. Will WSS leave the existing file alone?
Justin SmithSr. System Engineer
Top Expert 2012

Commented:
No

Author

Commented:
Thanks.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.