====== Para-Docs Server Restart Methods ====== There are multiple way of restarting different aspects of ParaDocs. Please go down this list in order. Only do the last few methods if you ABSOLUTELY have to. ===== Software Restart ===== - Stop/start postgres; wait for OK - Stop/start apache (often located in the httpd directory on unix); wait for OK - 'Restart Service' button in Para-Docs web interface admin tool; this restarts all posting service daemons ===== Operating System Restart ===== - FIXME give unix command here and options if OS wont respond ===== Hardware Restart ===== ==== Physical Access ==== If you have physical access to the machine, you can simple press the power button on the front of the server rack. ==== Remote Access ==== If you do NOT have physical access, you can power cycle the machine via the iBoot mechanism. - iBoot explanation and instructions - restart the Para-Docs machine via SSH - Login to the machine that you wish to restart using SSH. This can be accomplished using Windows-based terminal programs (Putty, etc.) or from a Unix-type command line (ssh). In order to restart the Para-Docs machine, you will need root user privileges. These can be obtained from the system administrator. - If you logged into the machine as a user other that root, type //su root// and press enter. You will be prompted for the password. Note that you will not see any visual feedback with each keystroke of the password (no asterisks or bullets will be shown), but the password is indeed being entered. If the //su root// command is successful, you will likely see a change in the prompt at the beginning of each line, indicating that you are now performing tasks as the root user. - Enter the command //shutdown -r now//. This command will reboot the computer immediately. If you wish to turn off the computer indefinitely, enter the command //shutdown -h now//. This will shutdown the computer and not restart it. ====== PostGres DBMS ====== The Para-Docs DBMS now runs on PostGres, an open-source DBMS http://www.postgresql.com ===== Tools ===== Two useful (and sometimes required) tools for PostGres: * pgAdmin - http://www.pgadmin.org/ - a graphical DBM tool; allows direct access to tables, SQL commands, schemas, etc. * PostGres ODBC driver - http://pgfoundry.org/projects/psqlodbc/ - A database connection tool, so that you can access the database directly in a windows environment ===== pgAdmin Setup ===== - Install the application - Add server (gsdocs.umbc.edu) - Enter username and password to the database ===== ODBC Setup ===== ?? FIXME ====== Document Profile Field Limits ====== ParaDocs' profile limits is a method of [[http://en.wikipedia.org/wiki/Mask_%28computers%29|masking]] the document profile fields. This means that when a user attempts to enter data into the specified field, the profile field limit/mask will determine which characters and how many characters will actually be taken. Maybe you want telephone numbers to have dashes in between, Social Security numbers to have 9 digits, or dates to be in dd/mm/yyyy format. You can encourage better data input with the above types of masks. See the ParaDocs Administrator Documentation for an overview and how to get to the limits editing screen. For details not in that documentation, see below ===== Known syntax ===== * * LOCKED * 0 * # The syntax derives from a Microsoft VB library called **MSMask32.ocx** . Lookup the library on Microsofts Developer network or general masking in VB help, for many additional syntaxes. ==== Examples ==== * "LOCKED" editing of fields cannot be done by an end user * "#########" simple SSN mask, looks for 9 numbers; there is a problem with this in that it does not allow leading zeroes * "000000000" similar to above; there is a problem with this in that it does not allow editing via the webviewers 'edit profile fields' functionality * "000######" SSN solution for UnderGrad; takes care of masking correctly, allows leading zeroes, and is editable in the webviewer * "" there is no masking goin on here ====== Linux Specific Tasks and Commands ====== ===== Useful commands ===== top ; shows running processes; press 'c' while it is running to see process details; press 'q' to quit screen ; lets you share screens with other people nano ; text editor that lets you use modern keyboard keys psql ; connect to postgres database in postgres command prompt /sbin/service postgresql restart ; restart the postgres server /sbin/service httpd restart ; restart the http/web server (ussually apache) ps axo pid,tty,stat,bsdstart,bsdtime,command ; list processes with time started and cpu time taken ;postfix any command with '&' to have it run in the background ===== UMBC posting daemon restart ===== ps ax ; shows the currently running processes ps ax | grep nps ; returns all currently running processes with the string 'nps' in it. See if one with a reference to 'umbc' in its name is running nano /etc/inittab ; opens a text editor for the inittab file. The [[inittab|http://www.netadmintools.com/html/inittab.man.html]] file describes which processes are started at bootup and during normal operation . Make sure that the line references the posting daemons are not commented out with a # cd /var/paradocs/nps-1.0/ ; changes your current directory ls ; lists the files and directories in the current directory php nps_umbc_import.php ; executes the file nps_umbc_import.php . it goes into a endless loop; end it by hitting ctrl+C pwd ; print working directory. Shows you which dir you are currently in /sbin/telinit Q ; reestablish all inittab settings and processes ps ax ; look for the umbc referencing process in the resultant list \rm -r myDirectory ; remove the directory 'myDirectory' recursively and with no prompts ===== Find a password in the database ===== psql paradocs Welcome to psql 8.0.6, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit paradocs=# select * from docuser where username = 'story1'; ====== ParaSync Offsite backup ====== DaySpring provides a complete offsite data backup service. It backs up data (database and pdf repository) nightly and costs us per gigagbyte. DaySpring is developing a white paper on security and an application to check on status, for the parasync service. Ask about it after December 2006. The paradocs scheduler / cron process called the 'paradocs archiver', is what runs this each night. See [[#Scheduler / Archiver]]. Below are shell commands that can be used to assure that parasync backup is running. [support@gsdocs ~]$ ps ax | grep php ;this command shows all running processes that are php executions 2431 ? Ss 24:54 /usr/bin/php /var/paradocs/nps-1.0/nps_daemon.php 2432 ? Ss 0:01 /usr/bin/php /var/paradocs/nps-1.0/nps_batchscan_daemon.php 2436 ? Ss 1:24 /usr/bin/php /var/paradocs/nps-1.0/nps_autoprofile_daemon.php 2438 ? Ss 0:56 /usr/bin/php -q /var/paradocs/nps-1.0/nps_fileop_daemon.php 2440 ? Ss 0:38 /usr/bin/php /var/www/html/paradocs-4.1/archive_daemon.php 2443 ? Ss 0:01 /usr/bin/php -q /var/paradocs/nps-1.0/nps_file_daemon.php 2449 ? Ss 0:01 /usr/bin/php -q /var/paradocs/nps-1.0/nps_psv_daemon.php 19619 ? Ss 0:00 /usr/bin/php -q /var/paradocs/nps-1.0/nps_umbc_import.php 5031 ? Ss 0:24 /usr/bin/php -q /var/paradocs/nps-1.0/nps_com_daemon.php 6052 pts/0 S+ 0:00 grep php ; look above for archive_daemon.php , this is what runs the parasync nightly; make sure it is always running or backup will not occur [support@gsdocs ~]$ cd /usr/local/data/repository ; move current directorly to repository directory [support@gsdocs repository]$ ls *.dmp ; list all files ending in dmp paradocsdb-1148691602.dmp paradocsdb-1148950822.dmp paradocsdb-1149210026.dmp paradocsdb-1149469225.dmp paradocsdb-1148778029.dmp paradocsdb-1149037214.dmp paradocsdb-1149296403.dmp paradocsdb-1149555611.dmp paradocsdb-1148864421.dmp paradocsdb-1149123641.dmp paradocsdb-1149382852.dmp ; the above shows nightly database dump files. the entire database is contained in each file. each file is backed up via parasync nightly. 14 days are kept. ====== Scheduler / Archiver ====== ParaDocs has a psuedo cron processor that they call the archiver. A database hold specifications for when to run what processes. It is very flexible to do whatever you want whenever. Scheduled runs are specified in a table in the database. See below for an example: ^ table name | archive_schedule | ^ attribute name | friendly_name | ^ instance | 'Para-Sync' | ====== Administrator Utility ====== Located at /var/www/html/paradocs-4.1/pas/