다음을 통해 공유


CSS AddProj Command

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Use this command to add a new Commerce Server Staging (CSS) project to one or more servers.

Note

In order to create projects, you must have rights to administer CSS or the project. You have rights if you are a member of the CSS Administrators group on the server or on the project.

After a project is created, it can be modified by using the EditProj command to specify additional properties such as pre and post-processing scripts and addresses to e-mail notifications.

AddProj <ProjectName> <Directory> [Dest1 | Route1] [...] [Flags] [GlobalFlags]

Parameters

Argument

Description

<ProjectName>

Specifies the name of the project. Type a unique name for the project. Project names must consist of alphanumeric characters and must not exceed 49 characters.

For each staging project, the project name must be the same on all servers in the staging topology.

<Directory>

Specifies the path of an existing directory. This directory is used to temporarily store data that is staged. The directory must be specified in the form: <drive>:/<path>.

Bb509039.alert_note(en-US,CS.70).gifNote:
The directory must exist on the source staging server only. On destination servers, CSS automatically creates the folder.

[Dest1 | Route1]

Specifies one or more destinations. A destination can be a server name, a route name, or a directory for same box replications. Separate multiple destinations with a space. When you specify route names, include the /Route flag. This causes CSS to treat those strings for which a route with a similar name exists as routes, and the rest as server names or directories. If the flag is omitted or /NoRoute is specified, CSS will treat all strings as either server names or directories.

Bb509039.alert_note(en-US,CS.70).gifNote:
Routes can only be used to stage Web content and business data. When you specify a route, AddProj creates the project on each server specified in the route automatically.

At least one destination must be specified for a project to be staged.

Flags

The following flag is valid for all staging projects.

Option

Description

/Comment <comment>

Contains comments for the staging project. This is comparable to entering text in the Note box on the Project tab in the Project Properties dialog box.

Web Content Project Flags

The following optional flags are only valid for Web content projects. If no flags are specified, /Incremental is assigned as the default.

Option

Description

/[No]Automatic

Specifies whether to stage content automatically or according to a schedule. This is comparable to selecting the Deploy automatically as content changes option on the Schedule tab in the Project Properties dialog box.

/[No]Delete

Specifies whether to preserve deleted content on the endpoint servers. This is comparable to selecting the Preserve Content on destination when deleting from source option on the Advanced tab in the Project Properties dialog box.

/[No]DirsOnly

Specifies to replicate the directory structure only.

Bb509039.alert_note(en-US,CS.70).gifNote:
This flag has no user interface counterpart. This flag cannot be used with the /Incremental option.

/[No]Force

Specifies whether to force deployment of all content. This is comparable to selecting the Force deployment of all content option on the Advanced tab in the Project Properties dialog box.

/[No]Incremental

Specifies whether to stage all content or only that content that has changed. This is comparable to selecting the Check time stamp only option on the Advanced tab in the Project Properties dialog box.

/Exclude <dir>

Specifies a single directory to be excluded from staging.

/ExcludeAll

Specifies that all subdirectories be excluded from staging.

/Filter <filter1> [...]

Specifies the filters to use to include or exclude specific assets, such as files or directories, in a Web content staging project. Options available for specifying filters are as follows:

+<filter>Includes the file or directory filter.
-<filter>Excludes the file or directory filter.
\Applies the filter to directories.
...\Applies the filter to all subdirectories.
<filter>A file or directory filter that can use wildcard characters.

For example, to include text1.txt, exclude all files that end in .exe that are in the project root directory, exclude the directory dir1, and include all *.jpg files in the whole directory tree, specify:

 /Filter "+text1.txt -*.exe -dir1\ +...\*.jpg"
Bb509039.alert_note(en-US,CS.70).gifNote:
This option is only applicable to Web content staging projects. When filters are defined, they only must be defined on the source staging server.

/MapURL <urlname>

Specifies the URL to which the destination maps. This is comparable to specifying the Virtual directory to be assigned to the project on the IIS tab in the Project Properties dialog box.

/[No]Route

Instructs CSS to compare the destination names that are provided against the route names that are defined on the server. CSS will treat the destination strings that resemble existing routes defined on the server as route names. The default assignment is /Route.

Bb509039.alert_note(en-US,CS.70).gifNote:
Routes can only be used to stage Web content and business data.

/VDirAttribs<rwesb>

Specifies the rights to set on the virtual directory:

  • r=Allow read access

  • w=Allow write access

  • e=Allow execute access

  • s=Allow script access

  • b=Allow directory browsing

This is comparable to specifying these optionson the IIS tab in the Project Properties dialog box.

IIS Metabase Project Flags

The following flag is only valid for IIS metabase projects. Specification of this flag is required for all IIS metabase projects.

Flag

Description

/Metabase

Specifies to stage IIS metabase information. Specify this option only when you want to define an IIS metabase staging project. This is comparable to selecting Metabase deployment on the Project tab in the Project Properties dialog box.

Business Data Flags

The following flags are valid for business data projects.

Flag

Description

/[No]BusinessData

Specifies the project type. Specify /BusinessData for business data projects. The project type must be the same on all servers in the staging topology.

Bb509039.alert_note(en-US,CS.70).gifNote:
CSS automatically sets the /NoBusinessData flag for Web content and IIS metabase projects. You cannot change the project type after the project is defined.

/BusinessXmlFile <filepath>

Specifies the path and file name to the business data configuration XML file.

/[No]Route

Specifies that one or more routes are specified as destinations. CSS will treat the destination strings that resemble existing routes that are defined on the server as route names. The default assignment is /Route.

Bb509039.alert_note(en-US,CS.70).gifNote:
Routes can only be used to stage Web content and business data.

Global Flags

Flag

Description

/Server <ServerName>

Specifies the server for which the command should execute. Leave blank to execute the command on the server where you enter the command.

/User <user> [pass | *]

Specifies the credentials to use to run the command. You must specify a user name that has the required CSS administrator or operator rights on the server where the command will be executed. If you omit the user name, the user name of the person who enters the command is used.

If you omit the password or enter an asterisk, CSS prompts you for the password. The password you enter is not displayed on the screen.

Remarks

You must have CSS administrator rights to execute this command.

When you add projects to multiple servers in a staging topology, both the project name and the project type must be the same across all servers. To specify additional project properties, see EditProj.

Note

Routes can only be used to stage Web content and business data. When you specify a route, AddProj creates the project on each server specified in the route automatically.

Example

The following series of commands are performed from the source server.

The first command adds a Web content project named Test1 to the local source server, specifying three destination servers that are named CS001, CS002, and CS003. The local directory that is defined for the project is C:\StagingTemp. This directory should be defined on the local source server. The default staging mode performs an incremental update. The command executes by using the credentials of the user logged into the local source server. This user must have CSS administrator rights on the source server in order to execute the command.

The next three commands define the Test1 project on each destination server. The destination servers specify the local directory where the staged content is to be copied. The AddProj command creates the directory on each destination servers.

Bb509039.alert_caution(en-US,CS.70).gifImportant Note:

The CSSUser must have CSS administrator rights on the remote destination servers for the commands to execute.

C:%COMMERCE_SERVER_ROOT%\Staging\Bin>Css AddProj Test1 C:\StagingTemp CS001 CS002 CS003
C:%COMMERCE_SERVER_ROOT%\Staging\Bin>Css AddProj Test1 C:\StagingTemp C:\Inetpub\wwwroot\ WebSiteA /Server CS001 CSSUser CSSPassword
C:%COMMERCE_SERVER_ROOT%\Staging\Bin>Css AddProj Test1 C:\StagingTemp C:\Inetpub\wwwroot\ WebSiteA /Server CS002 CSSUser CSSPassword
C:%COMMERCE_SERVER_ROOT%\Staging\Bin>Css AddProj Test1 C:\StagingTemp C:\Inetpub\wwwroot\ WebSiteA /Server CS003 CSSUser CSSPassword

See Also

Other Resources

Staging Web Sites and Commerce Server Data

Creating Projects for Staging

Managing Staging Projects

CSS EditProj Command

Staging Commands