Project

General

Profile

« Previous | Next » 

Revision 13284

/README.TXT: use `sudo -u ... -i` instead of `sudo su - ...` to avoid using two commands to accomplish the login

View differences:

README.TXT
8 8
		This includes all archived imports and staging tables.
9 9

  
10 10
Connecting to vegbiendev:
11
	ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
11
	ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
12 12
	cd /home/bien/svn # should happen automatically at login
13 13

  
14 14
Notes on system stability:
......
34 34
		http://vegpath.org/links/#**%20modifying%20a%20running%20shell%20script)
35 35

  
36 36
Single datasource import:
37
	ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
37
	ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
38 38
	(Re)import and scrub: make inputs/<datasrc>/reimport_scrub by_col=1 &
39 39
	(Re)import only: make inputs/<datasrc>/reimport by_col=1 &
40 40
	Note that these commands also work if the datasource is not yet imported
......
58 58
			if you encounter errors, they are most likely related to the
59 59
				PostgreSQL error parsing in /lib/sql.py parse_exception()
60 60
			See note under Testing below
61
	ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
61
	ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
62 62
	Ensure there are no local modifications: svn st
63 63
	up
64 64
	make inputs/download
......
167 167
				inputs/test_taxonomic_names/test_scrub # re-run TNRS
168 168
				rm=1 inputs/.TNRS/data.sql.run export_
169 169
				Commit
170
			ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
170
			ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
171 171
				If dropping a column, save the dependent views
172 172
				Make the same changes in the live TNRS.tnrs table on vegbiendev
173 173
				If dropping a column, recreate the dependent views
......
239 239
			Place the original .sql file in _src/ (*not* in _MySQL/)
240 240
			Follow the steps starting with Install the staging tables below.
241 241
				This is for an initial sync to get the file onto vegbiendev.
242
			ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
242
			ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
243 243
				Create a database for the MySQL export in phpMyAdmin
244 244
				Give the bien user all database-specific privileges *except*
245 245
					UPDATE, DELETE, ALTER, DROP. This prevents bugs in the
......
347 347
			./fix_perms
348 348
			make inputs/upload
349 349
			make inputs/upload live=1
350
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
350
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
351 351
			up
352 352
			make inputs/download
353 353
			make inputs/download live=1
......
363 363
unset TMOUT # TMOUT causes screen to exit even with background processes
364 364
--
365 365
	if http://vegbiendev.nceas.ucsb.edu/phppgadmin/ goes down:
366
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
366
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
367 367
			make phppgadmin-Linux
368 368
	regularly, re-run full-database import so that bugs in it don't pile up.
369 369
		it needs to be kept in working order so that it works when it's needed.
......
377 377
				on all machines:
378 378
				up
379 379
				./fix_perms
380
			ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
380
			ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
381 381
				upload:
382 382
				overwrite=1 bin/sync_upload --size-only
383 383
					then rerun with l=1 ...
......
398 398
		open Thunderbird
399 399
		click the All Mail folder for each account and wait for it to download the e-mails in it
400 400
	to back up the version history:
401
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
401
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
402 402
		svnsync sync file:///home/aaronmk/Dropbox/docs/BIEN/svn_repo/ # initial runtime: 1.5 h ("08:21:38" - "06:45:26") @vegbiendev
403 403
		(cd ~/Dropbox/docs/BIEN/git/; git svn fetch)
404 404
		overwrite=1        src=~ dest='aaronmk@jupiter.nceas.ucsb.edu:~' put Dropbox/docs/BIEN/svn_repo/ # runtime: 1 min ("1:05.08")
......
454 454
			If there are changes, update the data dictionary's Tables section
455 455
			When moving terms, check that no terms were lost: svn di
456 456
			svn ci -m 'mappings/VegCore.htm: regenerated from wiki'
457
			ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
457
			ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
458 458
				perform the steps under "apply new data dict mappings to
459 459
					datasource mappings/staging tables" above
460 460
	Important: Whenever you install a system update that affects PostgreSQL or
......
466 466

  
467 467
Backups:
468 468
	Archived imports:
469
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
469
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
470 470
		Back up: make backups/<version>.backup &
471 471
			Note: To back up the last import, you must archive it first:
472 472
				make schemas/rotate
......
475 475
		Remove: make backups/<version>.backup/remove
476 476
		Download: make backups/<version>.backup/download
477 477
	TNRS cache:
478
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
478
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
479 479
		Back up: make backups/TNRS.backup-remake &
480 480
			runtime: 3 min ("real 2m48.859s")
481 481
		Restore:
......
485 485
			yes|make schemas/public/reinstall
486 486
				Must come after TNRS restore to recreate tnrs_input_name view
487 487
	Full DB:
488
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
488
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
489 489
		Back up: make backups/vegbien.<version>.backup &
490 490
		Test: make -s backups/vegbien.<version>.backup/test &
491 491
		Restore: make backups/vegbien.<version>.backup/restore &
......
496 496

  
497 497
Datasource refreshing:
498 498
	VegBank:
499
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
499
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
500 500
		make inputs/VegBank/vegbank.sql-remake
501 501
		make inputs/VegBank/reinstall quiet=1 &
502 502

  
......
521 521
				This must be run *after* the datasources are installed, because
522 522
				views in public depend on some of the datasources
523 523
			sudo -E -u postgres psql <<<'DROP DATABASE vegbien_prev'
524
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
524
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
525 525
			repeat the above steps
526 526
			**WARNING**: Do not run this until reinstall_all runs successfully
527 527
			on the local machine, or the live DB may be unrestorable!
......
529 529
		on local machine:
530 530
			inputs/run postprocess # runtime: see inputs/run
531 531
			time yes|make inputs/{NVS,SALVIAS,TEAM}/test # old-style import; runtime: 1 min ("0m59.692s") @starscream
532
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
532
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
533 533
			manually apply schema changes to the live public schema
534 534
			do steps under "on local machine" above
535 535
	Sync ERD with vegbien.sql schema:
......
650 650
		make schemas/public/reinstall
651 651
		make inputs/ACAD/Specimen/logs/steps.by_col.log.sql
652 652
	To import and scrub just the test taxonomic names:
653
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo su - aaronmk
653
		ssh -t vegbiendev.nceas.ucsb.edu exec sudo -u aaronmk -i
654 654
		inputs/test_taxonomic_names/test_scrub
655 655

  
656 656
General:

Also available in: Unified diff