Opened 3 years ago
Closed 3 years ago
#3 closed task (fixed)
Migrate ownCloud from GreenQloud
Reported by: | chris | Owned by: | chris |
---|---|---|---|
Priority: | major | Milestone: | Install and configure crin1 |
Component: | owncloud | Version: | |
Keywords: | Cc: | jenny, gillian | |
Estimated Number of Hours: | 2.5 | Add Hours to Ticket: | 0 |
Billable?: | yes | Total Hours: | 2.55 |
Description
Migrate the ownCloud site from the GreenQloud server to crin1.crin.org.
Change History (7)
comment:1 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 1.6
- Total Hours set to 1.6
comment:2 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.5
- Total Hours changed from 1.6 to 2.1
There is a document Migrating to a Different Server which only differs in as much as it advises that the site should first be put into "maintenance mode".
The site can be put into "maintenance mode" using the occ comand line interface, see Using the occ Command.
So trying that, on the live server:
sudo -i su - cloud -s /bin/bash php occ maintenance:mode --on Maintenance mode enabled
Check the status at https://cloud.crin.org/ then run the data sync command on Crin1:
sudo -i bash bin/owncloud-sync
Now the site at https://cloud.crin1.crin.org/ works (no idea why it wasn't yesterday) but isn't in "maintenance mode"...
Migration script updated to add these steps:
#!/bin/bash # enable maintainance mode on remote server ssh web2 "sudo -u cloud php /var/www/owncloud/occ maintenance:mode --on" rsync -av web2:/var/www/owncloud/apps/ /var/www/owncloud/apps/ #rsync -av web2:/var/www/owncloud/config/ /var/www/owncloud/config/ rsync -av web2:/var/www/owncloud/data/ /var/www/owncloud/data/ chown -R owncloud:owncloud /var/www/owncloud/apps/ chown -R owncloud:owncloud /var/www/owncloud/config/ chown -R owncloud:owncloud /var/www/owncloud/data/ ssh web2 "mysqldump -uowncloud -pXXX owncloud > /root/owncloud.sql" scp web2:owncloud.sql /root/ cat /root/owncloud.sql | mysql owncloud # disable maintainance mode on remote server ssh web2 "sudo -u cloud php /var/www/owncloud/occ maintenance:mode --on"
Maintainance mode on the live server was switched off.
The admin interface displays:
Configuration Checks
No problems found
So I think this application is now ready to be migrated.
A start has been made on documenting ownCloud at wiki:OwnCloud.
comment:3 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.05
- Estimated Number of Hours changed from 0 to 2.5
- Total Hours changed from 2.1 to 2.15
2h 6m have been spent on this ticket so far, it's now ready for testing at https://cloud.crin1.crin.org/ and if everything is good it can be quickly updated prior to a DNS switch using the /root/bin/owncloud-sync script on Crin1, I'm adding a total estimated time to this ticket of 2.5 hours.
comment:4 Changed 3 years ago by jonas
I tried ownCloud and it opens and displays all the files. However, opening files is very slow. Could have to do with my connection as well though..
comment:5 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.25
- Total Hours changed from 2.15 to 2.4
Doing a final sync before the DNS update on Crin1:
sudo -i bash bin/owncloud-sync
Update ownCloud and other Debian packages:
a-up su - owncloud -s /bin/bash php console.php upgrade Turned on maintenance mode Checked database schema update Checked database schema update for apps Updated database Disabled 3rd-party app: documents Turned off maintenance mode Update successful
Tried to update the DNS but I don't have the right username and password, so will come back to this later.
comment:6 Changed 3 years ago by chris
- Cc jenny gillian added; jonas removed
Added Jenny and Gillian as CCs for this ticket.
comment:7 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.15
- Resolution set to fixed
- Status changed from new to closed
- Total Hours changed from 2.4 to 2.55
I have updated the dns for ownCloud so in a while accessing https://cloud.crin.org/ should result in people getting the Crin1 server. The 1984.is DNS have updated:
dig @NS0.1984.IS cloud.crin.org +short 93.95.228.179
The site on the GreenCloud server is in maintenance mode, so this ticket is now being closed, if there are any problems new tickets can be opened.
Following the install instructions:
So /etc/apt/sources.list.d/owncloud.list was created containing:
And the GPG key was installed:
These ownCloud packges are now available:
The packages installed on web2.crin.org are:
So these were installed:
The install has enabled /etc/apache/conf-available/owncloud.conf via the /etc/apache/conf-enabled/owncloud.conf symlink, we don't want /owncloud to work for all domains on the server so that symlink was deleted, the file contains:
An apache config was created at /etc/apache2/sites-available/owncloud.conf containing:
And then this was symlinked and tested:
So the owncloud user was created:
Creat a TMPDIR:
Setup vim for the owncloud user and enable history:
So now sync the data and create a script for future data syncs that will be needed before the DNS update.
First create a MySQL database for the site:
Initial sync of files:
Update the /var/www/owncloud/config/config.php with the correct MySQL details.
Create a script for future sycncs, /root/bin/owncloud-sync:
And run it.
Check for database updates:
So that was added to the Apache config for the site and also to /etc/php5/cli/php.ini, try again:
Restart Apache and test at https://cloud.crin1.crin.org/
And the login doesn't work, no error, it just doesn't log one in.
This variables was changed in /var/www/owncloud/config/config.php just in case that helped:
But it don't help.
I think I need to look up documentation on migrating sites / and or how to change the admin password to solve this.