Is there any way to make NtBackup restore from a command line?

  • Thread starter Thread starter Mark K Vallevand
  • Start date Start date
M

Mark K Vallevand

We are using NtBackup from a command line in a batch file to perform
backups. But, it does not allow restores when called from a command line.
This is by design, but in an embedded environment, I think it should be
allowed. Is there a way to make NtBackup do this?

--
Regards.
Mark K Vallevand (e-mail address removed)

Beer is living proof that God loves us and wants us to be happy.
- Benjamin Franklin


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
 
Mark,

Until you try you will never know :-)
I have just typed ntbackup /? and got chm help opened that give you command
line instructions :-)

So answer is yes you can use it.

Regards,
Slobodan
 
The help says that NtBackup cannot be used to restore files using the
command line options.

Yes, you can run the GUI to do a restore, regardless of how the program was
started. But, I'd like to have a command line backup and restore. This
works from a batch file:
ntbackup backup c: d: /f "\\server\backups\backup.bkf" /v:yes /L:s /M copy
/SNAP:off
but there is nothing like this:
ntbackup restore c: d: /f "\\server\backups\backup.bkf" /v:yes /L:s /M
copy /SNAP:off
Too bad.

I was hoping that there was a secret feature in NtBackup to do command line
restores.

--
Regards.
Mark K Vallevand (e-mail address removed)

Beer is living proof that God loves us and wants us to be happy.
- Benjamin Franklin


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
 
Yes you are right. I did not look deeper after I saw that it support command
line. I expected restore option to be there as well :-(

Regards,
Slobodan
 
Konstantin,

Mark has seen this, and I have seen this also when he told me that, but
thanks anyway :-)

Regards,
Slobodan
 
Slobodan,

You are right. Mark even said "This is by design" in the original post :-)
Well... having an official link always helps if someone is going to do a search on similar issues in future :-)
 
Btw, I think the problem with ntbackup not having the restore option comes deeper to VSS API. There is a function to make the
backups (CreateVssBackupComponents and http://msdn.microsoft.com/library/en-us/vss/base/ivssbackupcomponents.asp) but there is no
"easy" call to do the restore.

I have never done that myself but it seems that pretty much all the components of a system state
(http://msdn.microsoft.com/library/en-us/vss/base/backing_up_and_restoring_system_state_under_vss.asp) can be restored including
cluster database (BackupClusterDatabase/RestoreClusterDatabase) and SFC/WFP files.
And all information is in MSDN: http://msdn.microsoft.com/library/en-us/vss/base/custom_backups_and_restores.asp

Also, just files can be backed up and restored with old APIs like BackupRead/BackupWrite/etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top