Solved

Windows Back Up Utility

Posted on 2004-08-11
5
149 Views
Last Modified: 2010-05-02
I was  wondering if it was possible to use the Back Up Utility that comes with XP within  my vb code?  In other words, I would like to use the functionality of the tool in my vb application.  I'm not interested in any 3rd party solutions to do this. Anyone have any ideas?

Thanks in advance
0
Comment
Question by:LeeHenry
  • 3
  • 2
5 Comments
 
LVL 13

Accepted Solution

by:
Michael_D earned 500 total points
ID: 11779439
Here is what I've found in help file :)

Command line parameters
You can perform backup operations at the command prompt or from a batch file using the ntbackup command followed by various parameters.

Syntax:

ntbackup backup [systemstate] "bks file name" /J {"job name"} [/P {"pool name"}] [/G {"guid name"}] [/T { "tape name"}] [/N {"media name"}] [/F {"file name"}] [/D {"set description"}] [/DS {"server name"}] [/IS {"server name"}] [/A] [/V:{yes|no}] [/R:{yes|no}] [/L:{f|s|n}] [/M {backup type}] [/RS:{yes|no}] [/HC:{on|off}] [/UM]

Parameters:

systemstate

Specifies that you want to back up the System State data. When you back up the System State data, all of the System State data is backed up, therefore, the /s switch does not apply. Also, the backup type will be forced to normal or copy.

bks file name

Specifies the name of the backup selection file (.bks file) to be used for this backup operation. A backup selection file contains information on the files and folders you have selected for backup. You have to create the file using the graphical user interface (GUI) version of Backup.

/J {"job name"}

Specifies the job name to be used in the log file. The job name usually describes the files and folders you are backing up in the current backup job as well as the date and time you backed up the files.

/P {"pool name"}

Specifies the media pool from which you want to use media. This is usually a subpool of the Backup media pool, such as 4mm DDS. If you select this you must not use the following switches: /A /G /F /T.

/G {"guid name"}

Overwrites or appends to this tape. Do not use this switch in conjunction with /P.

/T {"tape name"}

Overwrites or appends to this tape. Do not use this switch in conjunction with /P.

/N {"media name"}

Specifies the new tape name. You must not use /A with this switch.

/F {"file name"}

Logical disk path and file name. You must not use the following switches with this switch: /P /G /T.

/D {"set description"}

Specifies a label for each backup set.

/DS {"server name"}

Backs up the directory service file for the specified Microsoft Exchange Server.

/IS {"server name"}

Backs up the Information Store file for the specified Microsoft Exchange Server.

/A

Performs an append operation. Either /G or /T must be used in conjunction with this switch. Do not use this switch in conjunction with /P.

/V:{yes|no}

Verifies the data after the backup is complete.

/R:{yes|no}

Restricts access to this tape to the owner or members of the Administrators group.

/L:{f|s|n}

Specifies the type of log file: f=full, s=summary, n=none (no log file is created).

/M {backup type}

Specifies the backup type. It must be one of the following: normal, copy, differential, incremental, or daily.

/RS:{yes|no}

Backs up the Removable Storage database.

/HC:{on|off}

Uses hardware compression, if available, on the tape drive.

/UM

Finds the first available media, formats it, and uses it for the current backup operation. You must use the /P switch to designate a device-type media pool when you use the /UM switch so that Backup searches for the appropriate type of media (for example, 4mm DDS). When you use the /UM switch, Backup will search the following media pools for available media: Free pool, Import pool, Unrecognized pool, and Backup pool. When available media is found, the search will stop and the media will be formatted and used without prompting you for input. This command is not applicable to tape loaders and should only be used if you have a stand-alone tape device.

 Notes

You cannot restore files from the command line using the ntbackup command.
The following switches will default to what you have already set using the graphical user interface (GUI) version of Backup unless they are changed by a command line switch: /V /R /L /M /RS /HC. For example, if hardware compression is turned on in the Options dialog box in Backup, it will be used if /HC is not specified on the command line. But if /HC:off is specified on the command line, it will override the Option dialog box setting and compression will not be used.
If you have Windows Media Services running on your computer, and you want to back up the files associated with these services, see "Running Backup with Windows Media Services" in the Windows Media Services online documentation. You must follow the procedures outlined in the Windows Media Services online documentation before you can back up or restore files associated with Windows Media Services.
You can only back up the System State data on a local computer. You cannot back up the System State data on a remote computer.
If you are using Removable Storage to manage media, or you are using the Remote Storage to store data, then you should regularly back up the files that are in the following folders:
Systemroot\System32\Ntmsdata

Systemroot\System32\Remotestorage

This will ensure that all Removable Storage and Remote Storage data can be restored.

0
 
LVL 6

Author Comment

by:LeeHenry
ID: 11783975
Thanks Michael!

Were currently upgrading to XP and Server 2003. Do you know if the commands for XP the same as older versions of windows?

Thanks
0
 
LVL 6

Author Comment

by:LeeHenry
ID: 11784007
I just found an article online that says windows server 20003 has some enhanced features for NTBackUp

http://techrepublic.com.com/5104-6242-5111577-2.html

0
 
LVL 6

Author Comment

by:LeeHenry
ID: 11784046
I'm assuming this means the command lines may be different too
0
 
LVL 13

Expert Comment

by:Michael_D
ID: 11784221
I dont know for sure but there is difference between backup TOOl and ntbackup command (that like part of OS i guess).
Ussually command's new versions are back compatible.
But you can never know :(
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now