Koha:Migration

From TSAS Library
Jump to: navigation, search

To Backup or Transfer the Entire Instance

  1. Create a new instance
  2. Run koha-dump instancename in source
  3. Download database files from source instance at Tools > Export data
  4. [If Configuration Backup unavailable]

sudo su cd ./var/spool/koha/tsaslibrary chmod 666 "tsaslibrary-2016-08-27.tar.gz" (config backup name) Download through Filezilla chmod 600 "tsaslibrary-2016-08-27.tar.gz" (config backup name) Repeat for sql.gz exit Source

  1. Upload both to /home/admin
  2. sudo koha-remove tsaslibrary
  3. sudo koha-restore tsaslibrary-2016-08-27.sql.gz tsaslibrary-2016-08-27.tar.gz

If: ERROR: File exists: /var/lib/koha/tsaslibrary/ ERROR: File exists: /var/lib/koha/tsaslibrary/authorities/ ERROR: File exists: /var/lib/koha/tsaslibrary/authorities/shadow/ ERROR: File exists: /var/lib/koha/tsaslibrary/authorities/register/ ERROR: File exists: /var/lib/koha/tsaslibrary/authorities/tmp/ ERROR: File exists: /var/lib/koha/tsaslibrary/authorities/key/ ERROR: File exists: /var/lib/koha/tsaslibrary/plugins/ ERROR: File exists: /var/lib/koha/tsaslibrary/uploads/ ERROR: File exists: /var/lib/koha/tsaslibrary/biblios/ ERROR: File exists: /var/lib/koha/tsaslibrary/biblios/shadow/ ERROR: File exists: /var/lib/koha/tsaslibrary/biblios/register/ ERROR: File exists: /var/lib/koha/tsaslibrary/biblios/tmp/ ERROR: File exists: /var/lib/koha/tsaslibrary/biblios/key/ sudo rm -r tsaslibrary

If: adduser: The user `tsaslibrary-koha' already exists. sudo awk -F':' '{ print $1}' /etc/passwd to verify user exists

attempt to change username sudo usermod -l oldtsaslibrary-koha tsaslibrary-koha usermod: user tsaslibrary-koha is currently used by process 6613

SHOWS MEMORY!! htop to check running processes by that user highlight, then kill process (F9) being used

If doesn't work, sudo pkill -u tsaslibrary-koha 6613 sudo pkill -9 -u tsaslibrary-koha sudo usermod -l oldtsaslibrary-koha tsaslibrary-koha sudo groupmod --new-name oldtsaslibrary-koha tsaslibrary-koha

If: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ps -ef | grep mysql to check if running admin 19133 18572 0 16:28 pts/3 00:00:00 grep mysql means it is not sudo service mysql restart

OR

1. Create a new instance[1] If "It Works!" run sudo rm 000-default.conf in /etc/apache2/sites-enabled, then sudo apache2ctl restart In /etc/koha/sites/tsaslibrary/koha-conf.xml <enable_plugins>1</enable_plugins> <backup_db_via_tools>1</backup_db_via_tools> <backup_conf_via_tools>1<backup_conf_via_tools> Set "Listen 8080" in ports.conf sudo nano /etc/apache2/ports.conf sudo apache2ctl restart Refresh page with ctrl+shift+r 2. Run koha-dump instancename in source 3. Download database files from source instance at Tools > Export data 4. Upload both to /home/admin 5. Unzip sql file sudo gunzip tsaslibrary-2016-08-27.sql.gz 6. Replace (?) current database with new one [this might not work here because I removed the instance...] sudo mysql -uroot -p Koha < /home/admin/tsaslibrary-2016-08-27.sql Pass: ******

  If no database found:
  sudo su
  mysql --user=root --password=******
  mysql> show databases;
  Yields:

+--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | +--------------------+ 3 rows in set (0.00 sec) "mysql" in this case is the name of the database Then: sudo mysql -uroot -p mysql < /home/admin/tsaslibrary-2016-08-27.sql 7. Return to browser, run installer again Upgrade will run Login with previous credentials Search failed 8. Reindex Zebra sudo koha-rebuild-zebra -f -v tsaslibrary 9. Move OPAC images to new server

Refs koha-create http://div.libriotech.no/kohamisc/man/koha-common.html user name change http://www.cyberciti.biz/faq/howto-change-rename-user-name-id/ simple transfer https://lists.katipo.co.nz/public/koha/2006/009608.html databases http://www.cyberciti.biz/faq/mysql-command-to-show-list-of-databases-on-server/ Install Koha on Debian https://wiki.koha-community.org/wiki/Koha_on_Debian