Size: 7245
Comment:
|
Size: 8420
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
Line 3: | Line 4: |
Line 10: | Line 10: |
Line 15: | Line 16: |
* [[DukeDMP|Duke's Data Management Protocol]] -- Data Maintenance and Demography Update Protocols * [[attachment:Princeton Data Management Protocol Babase 2.0.pdf]] -- Princeton Protocol for Data Maintenance/the Demography and Reproduction Update for Babase 2.0; most recent changes/additions to the protocol have been updated within this document, last updated April 2011. * [[DukeIDEP|Duke's Interaction Data Entry Protocol]] -- Specific to Grooming, MCE, and Agonisms |
* [[https://papio.biology.duke.edu/babasewiki/DataManagement?action=AttachFile&do=view&target=Duke+Data+Management+Protocols,+2013-09-17.pdf|Duke Data Management Protocol, Sep 2013 (PDF)]] -- Protocol for maintenance of social interaction including multiple interaction data, maturation milestones, psion data, swerb, human disturbance and predation, and PLHD * [[attachment:Princeton Data Management Protocol Babase 2.0.pdf]] -- Princeton Protocol for Data Maintenance/the Demography and Reproduction Update, last updated May 2014. |
Line 21: | Line 21: |
* [[GeneticTableForms|Forms for adding new data to the genetics tables]] |
|
Line 27: | Line 29: |
Line 36: | Line 37: |
* [[attachment:Historic Agonism Summary.xls]] | |
Line 38: | Line 40: |
Line 40: | Line 43: |
Line 41: | Line 45: |
Line 47: | Line 50: |
ALTER ROLE foo PASSWORD 'abcdef';}}} |
ALTER ROLE foo PASSWORD 'abcdef'; }}} |
Line 52: | Line 55: |
Line 53: | Line 57: |
Users can be added to babase, as well as a schema created, and permissions set, by completing the following steps using a SSH client. | |
Line 54: | Line 59: |
Users can be added to babase, as well as a schema created, and permissions set, by completing the following steps using a SSH client. | |
Line 56: | Line 60: |
PGPASSWORD='*********' babase-user-add USERNAME babase_readers}}} * The ********* here would be the babase_admin password |
PGPASSWORD='*********' babase-user-add YOURADMINNAME USERNAME babase_readers }}} * The ********* here would be the password that goes with your administrative user name. * The YOURADMINNAME is your username that has administrative privileges. |
Line 62: | Line 67: |
<<Anchor(newadminuser)>> ==== Adding an Admin User to Babase ==== Admin users can be added to babase, with no additional schema created, by completing the following steps using a SSH client. {{{ PGPASSWORD='*********' babase-user-add -a YOURADMINNAME NEWADMINNAME }}} * The ********* here would be the password that goes with your administrative user name. * The YOURADMINNAME is your username that has administrative privileges. * The Newadminname selected will become the babase username and temporary password. * It is __'''especially'''__ important that the user immediately change their password; admin accounts should be as secure as possible! Password can be changed using PPA's alter role option, or using the directions listed above for forgotten passwords. |
|
Line 63: | Line 81: |
Line 64: | Line 83: |
Line 69: | Line 87: |
REVOKE babase_readers from USERNAME;}}} | REVOKE babase_readers from USERNAME; }}} <<Anchor(deleteuser)>> |
Line 71: | Line 91: |
<<Anchor(deleteuser)>> | |
Line 77: | Line 96: |
ALTER TABLE oldschema.sometable SET SCHEMA newschema;}}} | ALTER TABLE oldschema.sometable SET SCHEMA newschema; }}} |
Line 79: | Line 99: |
Line 83: | Line 102: |
babase-user-delete USERNAME}}} The password requested is that of the babase administrator. |
babase-user-delete YOURADMINNAME USERNAME }}} The password requested is that of your administrative user name, the YOURADMINNAME. |
Line 92: | Line 111: |
REVOKE ALL ON TABLE sometable FROM someuser;}}} |
REVOKE ALL ON TABLE sometable FROM someuser; }}} |
Line 99: | Line 118: |
AlTER TABLE sometable OWNER TO anotheruser;}}} |
AlTER TABLE sometable OWNER TO anotheruser; }}} |
Line 106: | Line 125: |
Line 110: | Line 128: |
Line 111: | Line 130: |
PGPASSWORD='*********' babase-copy-babase-schema babase babase_test}}} * The ********* here would be the babase_admin password |
PGPASSWORD='*********' babase-copy-babase-schema YOURADMINNAME babase babase_test }}} * The ********* here would be the password of YOURADMINNAME |
Line 115: | Line 135: |
Line 116: | Line 137: |
PGPASSWORD='*********' babase-copy-babase-schema -f babase_test babase}}} | PGPASSWORD='*********' babase-copy-babase-schema -f YOURADMINNAME babase_test babase }}} * When Backing up the DB, the 'help' directory can offer some direction |
Line 118: | Line 141: |
* When Backing up the DB, the 'help' directory can offer some direction |
|
Line 121: | Line 142: |
[YOU@papio ~]$ pg_dump --help}}} |
[YOU@papio ~]$ pg_dump --help }}} |
This page is used to store codes, protocols, and procedures for use by the Data Managers.
Babase Technical Information
These links are primarly of interest to the Babase support staff.
Ranker Program -- The ranker program is used to develop and input Baboon social ranks.
The Babase VPN -- The Babase Virtual Private Network is available to those people who have a Unix Login on Papio. It is primarly used to run the ranker program.
The Psion Data Format -- The Psions are handheld data collection devices. They output their data in a custom format.
Programs
Protocols
Duke Data Management Protocol, Sep 2013 (PDF) -- Protocol for maintenance of social interaction including multiple interaction data, maturation milestones, psion data, swerb, human disturbance and predation, and PLHD
Princeton Data Management Protocol Babase 2.0.pdf -- Princeton Protocol for Data Maintenance/the Demography and Reproduction Update, last updated May 2014.
Data Storage.pdf -- See attachment for information on how data that come from the field are stored
Electronic Data Handling.pdf --See attachment for information on how electronic data are processed
Paper Data Handling.pdf --See attachment for information on how paper data are processed
Wiki Administration
Misc Links
SandboxPage -- Sandbox page for sharing code remotely
User Management
Forgotten Babase Password
There is no way to recover a forgotten password -- the user's password must be reset to a new value.
To reset the password of the user foo to abcdef login to Babase as the administrator, babase_admin, and issue the following SQL command:
ALTER ROLE foo PASSWORD 'abcdef';
After changing a user's password please have the user login and change their password to a value known only to themself.
Adding a User to Babase
Users can be added to babase, as well as a schema created, and permissions set, by completing the following steps using a SSH client.
PGPASSWORD='*********' babase-user-add YOURADMINNAME USERNAME babase_readers
- The ********* here would be the password that goes with your administrative user name.
- The YOURADMINNAME is your username that has administrative privileges.
- The Username selected will become not only the babase username and temporary password but also the schema name.
- It is very important that the user immediately change their password using PPA's password change option.
Adding an Admin User to Babase
Admin users can be added to babase, with no additional schema created, by completing the following steps using a SSH client.
PGPASSWORD='*********' babase-user-add -a YOURADMINNAME NEWADMINNAME
- The ********* here would be the password that goes with your administrative user name.
- The YOURADMINNAME is your username that has administrative privileges.
- The Newadminname selected will become the babase username and temporary password.
It is especially important that the user immediately change their password; admin accounts should be as secure as possible! Password can be changed using PPA's alter role option, or using the directions listed above for forgotten passwords.
Changing a User's Role in Babase
To change the role of a babase user, use grant and revoke. For example, below we grant the babase_editors role to the user and revoke the babase_readers role from the user.
GRANT babase_editors to USERNAME; REVOKE babase_readers from USERNAME;
Deleting a User from Babase
WARNING: The process described in this section deletes the user's personal schemas. Be sure to examine the tables in these schemas before deletion to be sure that nothing should be saved. A table may be transferred to another schema by the babase administrator with the following SQL command:
ALTER TABLE oldschema.sometable SET SCHEMA newschema;
Users can be deleted from babase, and their personal schemas deleted as well, by running the following command on papio using a SSH client:
babase-user-delete YOURADMINNAME USERNAME
The password requested is that of your administrative user name, the YOURADMINNAME.
Be sure to peruse the output as it not only displays all the tables and other database objects deleted but may also contain error messages and descriptions of why the operation failed. Lines containing error messages and further information are are prefixed with 'ERROR:' and 'DETAIL:'.
Errors are generally due to the user having explicit permissions to or ownership of objects that are not in their personal schema. These issues are resolved by connecting to the database in question (usually babase) as the database administrator and either using PPA's management features or directly issuing SQL commands. The SQL command to remove permissions from, say, a table is:
REVOKE ALL ON TABLE sometable FROM someuser;
If the database object in question is not a table then change the word TABLE in the above command to kind of object in question.
To reassign ownership of, say, a table to another user use the following SQL command:
AlTER TABLE sometable OWNER TO anotheruser;
Again, if the database object in question is not a table then change the word TABLE in the above command to kind of object in question.
Note that each user has a personal schema in each database, babase, babase_test, and babase_copy. The babase-user-delete command can succeed in deleting schemas from some databases and not others. If this occurs the command can be re-run once the situation which prevents schema deletion is rectified. In this case you may receive errors which say that schemas do not exist. These can be safely ignored.
Copying the Babase Schema
The babase-copy-babase-schema Unix program copies the entire babase schema, including data, table definitions, validation, and everything else, from one database to another. All existing data, table definitions, validation, etc is deleted from the babase schema in the target database. You must be logged in to papio and at the Unix prompt to run the program.
The following example copies the babase schema from the babase database to the babase_test database. The first database (babase) is the database to copy from, the second (babase_test) the database to copy into.
PGPASSWORD='*********' babase-copy-babase-schema YOURADMINNAME babase babase_test
- The ********* here would be the password of YOURADMINNAME
The next example copies the babase scheme from the babase_test database to the babase_database. The program will not copy into the babase database unless the -f (force) flag is given.
PGPASSWORD='*********' babase-copy-babase-schema -f YOURADMINNAME babase_test babase
- When Backing up the DB, the 'help' directory can offer some direction
[YOU@papio ~]$ pg_dump --help
Killing a Process in PPA
After you have logged into the database as the administrator, select the babase database.
There is a tab along the top of the browser window with a button for Processes. Click this button.
You may have to click cancel on the process you are killing a couple of times. It will tell you that the function has failed, its just kidding!