From OpenDCIM Wiki
(Created page with "=== Upgrading Your Installation === Every distribution of openDCIM comes with an install.php file that will run if it is detected by the application. There is no need to man...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
# Unpackage the distribution file into a new folder - not on top of the existing one. A typical installation would go into a folder such as ''/var/www/html/openDCIM-3.3' and a symlink would be created at ''/var/www/html/opendcim'' that points to the version numbered directory. Apache would be configured to look at the symlink - meaning whenever you upgrade, you only have to change the symlink and you can leave Apache alone. | # Unpackage the distribution file into a new folder - not on top of the existing one. A typical installation would go into a folder such as ''/var/www/html/openDCIM-3.3' and a symlink would be created at ''/var/www/html/opendcim'' that points to the version numbered directory. Apache would be configured to look at the symlink - meaning whenever you upgrade, you only have to change the symlink and you can leave Apache alone. | ||
# Copy ''db.inc.php-dist'' to ''db.inc.php'' and modify as needed for your site. It is not a good idea to just copy the version from the previous version because sometimes configuration directives in this file are added. If you copied an old version you wouldn't have that. | # Copy ''db.inc.php-dist'' to ''db.inc.php'' and modify as needed for your site. It is not a good idea to just copy the version from the previous version because sometimes configuration directives in this file are added. If you copied an old version you wouldn't have that. | ||
− | # Copy your .htaccess file from the old install folder to the new one. | + | # Copy your .htaccess file from the old install folder to the new one. (only if you are using Apache auth) |
+ | # Copy your pictures and drawings folders across from your old folder to the new install; also ensure these new folders are writable by your webserver’s user account. Since version 19.02, the recommendation is that you place all of your pictures in /var/www/assets/pictures and your drawings in /var/www/assets/drawings. Then create a symlink from /var/www/assets to your installation folder as ${folder}/assets. This way as you upgrade from version to version, all you have to do is make a symlink in the new folder. You can specify the exact folder for where Pictures and Drawings go in the Configuration screen. You should not be placing site specific files in the images folder. | ||
# Update your symlink to point to the new version and restart Apache to flush out its cache. | # Update your symlink to point to the new version and restart Apache to flush out its cache. | ||
# Open your browser and go to your DCIM site and log in as a user with Site Admin privileges - otherwise the installer will complain that the site is under maintenance. Be sure to actually read everything on the screen and follow what it says. Some upgrades have expected ''notice'' messages that will pop up, which are certainly different from true errors. We try to make the errors obvious. | # Open your browser and go to your DCIM site and log in as a user with Site Admin privileges - otherwise the installer will complain that the site is under maintenance. Be sure to actually read everything on the screen and follow what it says. Some upgrades have expected ''notice'' messages that will pop up, which are certainly different from true errors. We try to make the errors obvious. | ||
Line 16: | Line 17: | ||
A typical upgrade is complete in less than 10 minutes (including all steps, not just the browsing to the installer). If you have a large installation (5,000 devices or more) it can take longer, so please be patient. Do not refresh during the upgrade or it will abort mid-way and you will have to restart from your backup created in Step 2. | A typical upgrade is complete in less than 10 minutes (including all steps, not just the browsing to the installer). If you have a large installation (5,000 devices or more) it can take longer, so please be patient. Do not refresh during the upgrade or it will abort mid-way and you will have to restart from your backup created in Step 2. | ||
+ | |||
+ | [[Main_Page|Back to the Main Page]] |
Latest revision as of 16:16, 9 March 2021
Upgrading Your Installation
Every distribution of openDCIM comes with an install.php file that will run if it is detected by the application. There is no need to manually run it - and you should never run the *.sql files manually unless you are absolutely positive that you know what you are doing. Getting your database schema out of sync with the released versions can cause data loss.
Best Practices
- Coordinate with your users for an upgrade window and make sure that they aren't trying to modify the db while you upgrade. In other words, Change Management.
- Make a backup of your database. This is done with the mysqldump command. Typical command would be mysqldump --opt dcim > backup.sql.
- Unpackage the distribution file into a new folder - not on top of the existing one. A typical installation would go into a folder such as /var/www/html/openDCIM-3.3' and a symlink would be created at /var/www/html/opendcim that points to the version numbered directory. Apache would be configured to look at the symlink - meaning whenever you upgrade, you only have to change the symlink and you can leave Apache alone.
- Copy db.inc.php-dist to db.inc.php and modify as needed for your site. It is not a good idea to just copy the version from the previous version because sometimes configuration directives in this file are added. If you copied an old version you wouldn't have that.
- Copy your .htaccess file from the old install folder to the new one. (only if you are using Apache auth)
- Copy your pictures and drawings folders across from your old folder to the new install; also ensure these new folders are writable by your webserver’s user account. Since version 19.02, the recommendation is that you place all of your pictures in /var/www/assets/pictures and your drawings in /var/www/assets/drawings. Then create a symlink from /var/www/assets to your installation folder as ${folder}/assets. This way as you upgrade from version to version, all you have to do is make a symlink in the new folder. You can specify the exact folder for where Pictures and Drawings go in the Configuration screen. You should not be placing site specific files in the images folder.
- Update your symlink to point to the new version and restart Apache to flush out its cache.
- Open your browser and go to your DCIM site and log in as a user with Site Admin privileges - otherwise the installer will complain that the site is under maintenance. Be sure to actually read everything on the screen and follow what it says. Some upgrades have expected notice messages that will pop up, which are certainly different from true errors. We try to make the errors obvious.
- When you are back that the Create Data Center (same as an initial installation) screen the upgrade has completed. You must either rename or delete the install.php file, otherwise openDCIM will continually attempt to run the upgrade every time someone tries to browse to it.
- Inform your users that the upgrade is complete and they can once again use openDCIM.
A typical upgrade is complete in less than 10 minutes (including all steps, not just the browsing to the installer). If you have a large installation (5,000 devices or more) it can take longer, so please be patient. Do not refresh during the upgrade or it will abort mid-way and you will have to restart from your backup created in Step 2.