SnAdmin tools

From Sense/Net Wiki
Jump to: navigation, search
  •  
  •  
  •  
  •  
  • 100%
  • 6.5.5
  • Enterprise
  • Community
  • Planned

sensenet 7: this article has a more recent version on the new community site.

Overview

SnAdmin is the main tool in Sense/Net ECM for executing upgrade or custom packages. It also helps you with common operations related to the Content Repository or modifying the installed Sense/Net ECM instance. These are the SnAdmin tools that this article is about.

In previous Sense/Net versions there were separate command line tools for these operations. From version 6.5.5 these are replaced by simple SnAdmin tools so that you do not have to maintain multiple configuration files, only the one for the SnAdminRuntime executable.

Details

In most cases SnAdmin packages contain many steps that may add new dlls, new content to the repository or even change the database schema. But we also offer simple built-in packages for common operations like importing or exporting content items so that you do not have to create packages manually, just execute them. This article is for operators and developers about these built-in packages (SnAdmin tools) that you can use out-of-the box, in a way that is similar to executing simple commands.

Please note that most of the following tools require the local Sense/Net ECM web site to be stopped as they access the same index.

Tool packages

An SnAdmin tool is technically a built-in package that resides in the web\Admin\tools folder. Usually these tool packages are very simple, containing only a few Built-in steps. When you execute a tool, you actually execute one of these packages with providing a few parameters - e.g. what do you want to import or which part of the repository do you want to re-index. The command line parameters are the same parameters that these built-in steps have.

For example this is how you execute the import tool:

SnAdmin import source:"c:\localrepo\new-articles" target:"/Root/Sites/MySite/articles"

The tool above will import the usual Content struture from the provided source file system directory to the Content Repository folder provided as the target parameter.

List of SnAdmin tools

To execute these tools you only have to open a command line from the web\Admin\bin folder and execute SnAdmin the same way as you execute an upgrade.

SnAdmin [toolname] [parameters]

import

Imports Content items from the file system to the repository.

SnAdmin import source:"c:\localrepo\new-articles" target:"/Root/Sites/MySite/articles"

export

Exporting a folder:

SnAdmin export source:"/Root/Sites/MySite/articles" target:"c:\localrepo"

Exporting only selected (filtered) content items using the Content Query syntax:

SnAdmin export source:"/Root/Sites/MySite/articles" target:"c:\localrepo" filter:"+TypeIs:Article +CreationDate:<@@CurrentDate+3days@@"

index

Re-create the index for the whole Content Repository (in case of a large repository this may take time).

SnAdmin index

Repopulate the index of a subtree.

SnAdmin index path:"/Root/Sites/MySite/MyFolder"

createeventlog

Creates the default event log for Sense/Net ECM so that you can see entries in the Event Viewer tool.

SnAdmin createeventlog

Creates a named event log for your project.

SnAdmin createeventlog logname:"MyProject"

deleteeventlog

Deletes an event log along with its registered sources.

SnAdmin deleteeventlog logname:"MyProject"

Related links

References

There are no external references for this article.