Scripts
imperia's Administration Scripts#
imperia's administration scripts are intended as tools for system administrators. They can simplify common tasks and are executed via a call on the command line. The scripts are located in the site/bin
directory of your imperia installation. Access via the user interface is not possible.
Important
-
Before using the administration scripts, make sure that a recent backup exists.
-
Also, imperia should be in maintenance mode (see Maintenance Mode with Superuser Access).
All scripts are located in the site/bin
directory. This documentation provides an overview the scripts. In order to get a more detailed explanation, as well as a list of the available options, run the desired script with the -h
bzw. --help
option:
admin_accesscat.pl --help
Older or deprecated scripts are renamed script_name.pl.000
, when you run the latest install.pl
. If in doubt, you can simply delete the site/bin
directory and run the most recent install.pl
.
admin_accesscat.pl#
With this script access rights to a category can be displayed and changed.
admin_accesselement.pl#
The intended format of the command arguments is:
site\bin\admin_accesselement.pl template:Movies id:1:r name:Editor:rw
Where the first parameter is of the type <type>:<name/id> +/- RIDENT
.
admin_accessmeta.pl#
Specify the access rights for a meta file or read the current access permissions.
admin_accessrole.pl#
Specify the access rights for roles or read the current configuration.
admin_accesstemplate.pl#
Specify the access permissions for a template or read the current configuration.
admin_accessworkflow.pl#
Specify the access permissions for a workflow(-metafile).
admin_acl_update.pl#
With this script old, no longer valid roles, are deleted from the ACLs.
admin_addcat.pl#
This script is used to create new categories or subcategories.
The properties of the new category are defined using the call parameters. All fields are optional, except the category's name.
For subcategories, the unique name or ID of the parent category must also be specified.
Note
After creating a category, using admin_addcat.pl
, set its permissions, using admin_accesscat.pl
.
admin_adddoc.pl#
With this script a new document, whose attributes are set via the call parameters, is created. By default, the workflow for the new document is then initiated. However, you can prevent this with help of a parameter.
admin_addgroup.pl#
With this script a new group is created. The name of the new group and a comment can be set when you call the script.
Use the script admin_grpuser.pl
(see admin_grpuser.pl) to grant users access to this group.
The scripts, available for defining the new group's permissions are:
- admin_accessrole.pl,
- admin_accesscat.pl,
- admin_accesstemplate.pl,
- admin_accessmeta.pl and
- admin_accessworkflow.pl.
admin_adduser.pl#
Use this script to create a new user. The attributes of the new user can be passed when you call the script.
Access permissions are granted to the new user with the admin_grpuser.pl
script, that is used to define a group membership.
The added user can be edited later via the admin_setuser.pl
script.
admin_asset_actions.pl#
Use this script to set or display asset actions for a category or specific asset. Specify the object to process via NodeID.
admin_cat_del.pl#
Use this script to completely delete a category from the category tree. The category is specified by NodeID or its unique name.
Note
Referenced documents are not deleted.
admin_cleandesktop.pl#
This script finds and deletes all MAM documents on the desktop, that have no associated binary data. Documents of this kind are a result of a canceled upload.
Note
In case the script encounters locked documents, it skips them and moves on. An error message, containing the NodeID of the skipped document, will be displayed.
admin_delete_entry.pl#
Use this script to delete archive entries or documents on the desktop.
Note
The options to delete from the archive and the desktop are mutually exclusive and cannot be performed simultaneously.
- admin_delfile.pl#
Use this script to to delete documents from the system.
But consider that archive version remain. In order to delete those, too, use Archive::Killer (deleteArchivedMetaInfo also doesn't completely delete the document).
admin_delrole.pl#
This script is used to delete a group or user from the system. The ID or the role's unique name may be specified as a parameter.
admin_duplicates.pl#
Use this script to display and fix duplicate category IDs in File65 storage.
admin_expire.pl#
With this script documents that have come to an expiration date can be either displayed or written in the site/articles/expiry.new
file.
admin_fake_publish.pl#
Use this script to make all documents on a system published/not published to specific target(s) without actually transferring any files.
admin_getcat.pl#
With this script the properties of a category can be displayed. There are various output formats that can be chosen via call parameters. Specify the category by NodeID (starting with a slash) or its unique name.
admin_getdoc.pl#
With this script the meta information of a document can be displayed. There are various output formats that can be chosen via call parameters. Specify the document by NodeID
If you want to have the information of an archived version of a document, enter the arch_id of the desired version. Otherwise, the information about the latest version will be displayed.
admin_getrole.pl#
With this script the properties of a group and user can be displayed. There are various output formats that can be chosen via call parameters. Specify the group or user by ID or its unique name.
admin_grpuser.pl#
With this script you can display which roles may be assumed by a user or grant a user access to other roles.
Available options:
--repair
shows which groups are missing.
admin_listcat.pl#
Use this script to display a list of all subcategories of a top level category.
admin_listflex.pl#
Call this script to display a list of all flex modules, including their validcodes, invalidcodes and authors.
admin_listmeta.pl#
Call this script to display a list of all meta files on your system.
admin_listrole.pl#
Call this script to display a list of all roles on your system.
admin_listtemplate.pl#
Call this script to display a list of all templates on your system.
admin_listunreferenced.pl#
Call this script to display a list of all unreferenced assets of the desired category.
admin_listuser.pl#
Call this script to display a list of all users on your system.
admin_listworkflow.pl#
Call this script to display a list of all workflows on your system.
admin_mam_reparent_orphans.pl#
Use this script to scan for imperia asset variants which parent has been overwritten.
admin_mam_thumbgen.pl#
Use this script to enforce a new, default thumbnail size (usually after changing the value of MAM_THUMBNAIL_SIZE
).
admin_mam.pl#
Use this script to manually rebuild MAM filter and/or MAM search index.
admin_multilang.pl#
This is an intern script and normally shoud not be used.
admin_remove_prefs.pl#
Use this script to delete certain keys from users' personal preferences.
admin_repair_repository.pl#
Use this script to delete every faulty entry from repository.
Note
Please make sure to have a backup of your data before running this script.
admin_reparse.pl#
This is an intern script and normally shoud not be used.
admin_rlimit.pl#
This is an intern script and normally shoud not be used.
admin_sanitisearchive.pl#
This script is used to clean up the archive, or individual areas in it.
Enter a NodeID or a unique category name to clean up only a part of the archive. If subcategories should also be cleaned up, that must also be indicated when calling the script.
Alternatively, the whole archive can be cleaned up.
There are two options for the clean up. Delete all unfinished document versions that are older than the most recent finished, or further restrict the number of remaining complete versions.
admin_searchdoc.pl#
Use this script to search documents based on a specific criteria.
You get a list of documents that meet your search criteria.
To narrow down the search when you can call the node ID or the unique name of a category.
admin_setcat.pl#
Use this script to change the properties of existing categories.
The category is determined by specifying a node ID or a unique name in the call.
The values that have to be changed are passed in the form of a space-separated set of name-value pairs.
admin_setdoc.pl#
Use this script to change the meta information of a document. You select the document by specifying a NodeID in the call.
By default, meta information from the last version of a document is changed. Optionally, the last finished version's meta information can be changed or a specific version from the archive using archID.
admin_setrole.pl#
This script can be used to edit group properties.
Give the script the ID or unique name of the group that you want to change, and a space-separated set of name-value pairs with the new properties.
admin_setuser.pl#
This script can be used to edit user properties.
Give the script the ID or unique name of the user you want to change, and a space-separated set of name-value pairs with the new properties.
admin_unnname2id.pl#
Use this script to recreates the file /path/to/site/roles/database/name2id
which is nessecairy for the login-process.
clone_repository.pl#
Use this script if the data storage type has to be changed. The script also copies the exact IDs of categories and documents.
site/bin/admin_anonymize_accesslog.pl#
By using this Perl script you can generate ann Access log compliant with data privacy.
The script works as follows:
- Reading
site/logs/access.log
line-by-line. - For every string
"Login: an_user_name"
by the end of the line, the user name will be replaced bymd5sum
of the user name. - The output is written in site/logs/anonymized_access.log or in any location specified by
-o
.
site_doctree_search_index.pl#
Use this script to reduce imperia's search index, using blacklist and qualified list for the metafields.
site_migrate_iwe_to_iwe2.pl#
Use this script to migrate iWE processing instructions to iWE2. The script goes through all html-based templates, flex and slot modules, and codeincludes, and tries to migrate the processing instructions.
Note
The script has no effect on any external configuration files.
site_publish_status.pl#
Use this script to check each imperia document on a develop system and reset its publish status according to a target server definitions.
site_rebuild_db.pl#
Use this script to rebuild redundant imperia data. It is also the final step in migrating the system.
Please note
site_rebuild_db.pl
may take a lot of time, which is why it can be interrupted and restarted at any time.
- For more information, call the parameter -h (for help).
In the following you find all options in an overview:
-
-m
,--minimal
: minimal rebuild, it is very fast. In this mode the documents won't be aligned, only the user management and the categories' information. -
-A
,--disable-autocommit
: disables autocommit. This option must be combined with -m optionAlso, the with the parameter -A (deactivate Autocommit) the performance of the script can be enhanced significantly.
Wichtig
We recommend to do this in the Maintanance Mode and also to deactive Hermes.
-
--only-targets
: rebuilds data for specified targets. eg. DEV,live1,live2 -d
,--doc-copies-only
: only rebuild document copies-U
,--no-um
: do not rebuild User Management-related data-t
,--todo
: Creates a ToDo list.-b
,--batch
: Executes the ToDo list. Can be stopped and restarted
Possible Scenarios and site_rebuild_db options:
-
Upgrade imperia major version.
You can use site_rebuild_db with -m and -U and -A options * Damaged sqlite file and you want fast restore
You can use site_rebuild_db with -m and -A options. After this you will have working imperia installation but without all features If you want to use Document Browser and MAM you should run site_rebuild_db with --only-targets DEV If you want to have full working imperia installation you should run the commands which are written in the output of site_rebuild_db. This commands may be run together.
/cgi-bin/site_info.pl#
In order to get information about the imperia sub version.