Skip to content

Instantly share code, notes, and snippets.

Make sure your VM is shut down!
1. In your virtualbox folder, find the correct disk image. If it isn't already a vdi, convert it:
`VBoxManage clonehd box-disk1.vmdk box-disk1.vdi --format vdi`
2. Enlarge the vdi file.
The number you give as an argument is in MB, or GB times 1024. In this case 250GB * 1024 MB/GB = 256000:
`VBoxManage modifyhd box-disk1.vdi --resize 256000`
3. Open VirtualBox manager and click on the New icon in the top left to create a new machine. After naming it and picking the amount of memory,
to dump production db:
from commandline: pg_dump -U postgres -h db5.sgn.cornell.edu cxgn_musabase | db5.cxgn_musabase.pgsql.gz
to rename old test db:
ALTER DATABASE sandbox_musabase RENAME TO sandbox_musabase_backup
if there is an error, check for active processes: SELECT * FROM pg_stat_activity;
and force disconnect of processes (should be idle!):
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid( ) AND datname = 'sandbox_musabase';
the run ALTER command again, or remove it:
DROP DATABASE sandbox_musabase;
ssh production@172.30.2.197
cd /export/prod/jbrowse_cassavabase/current/data
sudo mkdir cassava_example
cd cassava_example/
sudo mkdir data_files
cd data_files/
sudo ln -s /export/prod/public_cassava/Manihot_v6.1/ .
cd ../
sudo ../../bin/prepare-refseqs.pl --fasta data_files/Manihot_v6.1/assembly/Mesculenta_305_v6.fa
sudo mv data/* .
## Ref seq
cd to /export/prod/jbrowse_cassavabase/JBrowse-1.11.6/data/json
sudo mkdir cassavaV6_1
cd into it
Downloaded Mesculenta_305_v6.fa.gz from JGI <http://genome.jgi.doe.gov/pages/dynamicOrganismDownlo\
ad.jsf?organism=Mesculenta>
sudo bin/prepare-refseqs.pl --fasta Mesculenta_305_v6.fa.gz
sudo mv data/* .
sudo rm -r data
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443 default_server;
1. Login to VM as user who will be changed
1. use command 'id' to list current user's ids. Writedown current(old) UID and GID
2. determine what your new username's ids will be. If you already have an account in the sgn network, ssh into solanine and run 'cat /etc/passwd' to see what you systemwide ids are
3. change password with command 'passwd'
4. 'sudo su' to become superuser
4.5 for the following commands, it may be necessary to first stop all processes associated with the user to be changed, by running 'killall --user <OLDUSERNAME>'
5. 'usermod -l <NEWUSERNAME> -m -d <PATH/TO/NEW/HOMEDIR> <OLDUSERNAME>' to rename username and homedir
6. 'groupmod -n <NEWUSERNAME> <OLDUSERNAME>' to rename group
7. 'usermod -u <NEWUID> <USERNAME>' to change UID
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 100m;