ListManager has a number of command line options for database actions. To use them, open a command prompt, and change to the directory where you have installed ListManager. Then, run
lm command
or
./lm command
if you're using Unix.
dbcreatetemplates
Creates or updates the default templates. Normally, the Setup program takes care of creating the default templates for you. The updated templates will not appear until you restart ListManager and the ListManager web server.
dbbillingcreate
Creates all the database tables used by ListManager for billing. Any existing billing tables in the database will be deleted and recreated, deleting any data in those tables.
ListManager must not be running when this command is run.
dbcreate
Creates all database tables used by ListManager. Any existing ListManager tables in the database
will be deleted and recreated.
If you specify a password on the command line, this will be used to create a default administrator account with the name "admin". If you do not specify a password the password for the admin account will be "lyris".
For example, to create the databases with an admin password of "blue", you would type:
lm dbcreate blue
Please note that this will completely erase any data you have in the ListManager tables in your database and start you anew. If you are unsure about this command, back up your database first.
ListManager must not be running when this command is run.
After running dbcreate, you'll need to tell ListManager what your activation code is. You can either insert it into the lyrConfigNodeSettings table directly, or use a command to enter this information. See Setting Server Options for more information about the activate and dns commands.
dbinmailcreate
Recreate the incoming mail database table, clearing the table that already exists.
This option is useful if you want to quickly erase all email in the incoming mail database, perhaps because you sent a lot of email to ListManager that you now realize you do not want it to process.
ListManager should not be running when this command is run.
dboutmailcreate
Recreate the outgoing mail database table, clearing the table that already exists.
This option is useful if you want to quickly erase all email in the outgoing mail database, perhaps because you told ListManager to send a lot of email you now realize you do not want it to send.
ListManager should not be running when this command is run.
dblogcreate
Recreate the ListManager log database table, clearing out all log entries that are currently there.
This option is useful if you want to completely clear all the log entries in ListManager, in a very rapid manner. For example, if you have no need for the existing log entries, this will remove them all.
ListManager should not be running when this command is run.
dbupgrade
Converts the ListManager database files to the most current format. You need to run this command when
upgrading to a new version of ListManager. Normally, the Setup program takes care of running this for
you. Be sure you have sufficient disk space for transaction logs before performing a dbupgrade. It is
highly recommended that you perform a backup of your database (or a database dump for MSSQL) before upgrading
your database.
ListManager must not be running when this command is run.
deletenode
Deletes the specified node from the database. Syntax:
lm deletenode nodename
encode_string
Encrypts the name or password ListManager uses to connect to the database. Syntax:
lm encode_string password
Password is not case sensitive. This means that "lm encode_string password" and "lm encode_string PASSWORD" will return the same string.
The string that is returned may then be used by the lmcfg.txt parameters $sql_encoded_username and $sql_encoded_password to connect to the database.
exporttofile
Exports the database to a flat file. This command can be used when moving to a different database when used in conjunction with the importfromfile command.
Syntax:
lm exporttofile filename.dat
ListManager must not be running when this command is run.
getmachinename
Displays the default machine name for this ListManager installation.
importfromfile
Imports the database from a flat file created by the exporttofile utility. This command can be used when moving to a different database when used in conjunction with the exporttofile command.If the file is being copied to another machine, be sure to transfer it in binary mode.
A database can only be imported into the same version of ListManager it was exported from. For example, you cannot import the database from a 6.0 ListManager installation into a 7.0 ListManager installation.
Syntax:
lm importfromfile filename.dat
noremoveduplicateoutmail
This causes the server to not attempt to find and remove lyrActiveRecips rows that have a corresponding entry in lyrCompletedRecips. This query can be very long, even when it finds and removes nothing. It might also cause the second and subsequent nodes in a cluster to deadlock while coming up.There is a risk that some recipients might receive duplicate emails.
Syntax:
lm noremoveduplicateoutmail
ListManager must not be running when this command is run. Note that any custom columns will not be imported.
notransact
Used with dbupgrade to stop the database from putting all the upgrade in transaction logs. This command allows the transaction logs to be manually truncated as the dbupgrade is being processed, so less disk space will be necessary. This command may be necessary if you are upgrading a very large database in MSSQL.
Syntax:
lm dbupgrade notransact
ListManager must not be running when this command is run.
renamenode
Renames the specified node in the database.
Syntax:
lm renamenode oldnodename newnodename
restorerootdnsservers
Restores any of the default DNS root servers that may be missing from the dnsbypass_ table. If the root DNS servers have been deleted using the web interface, ListManager will not be able to function properly. To restore them, run this command at the command prompt.
Syntax:
lm restorerootdnsservers