Difference between revisions of "HDA OS Migration Guide"
(68 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <p>The purpose of this tutorial is to provide a method for migrating Amahi HDA settings from one Amahi supported OS to another | + | <p>The purpose of this tutorial is to provide a method for migrating Amahi HDA settings from one Amahi supported OS to another via a new install, such as: |
+ | * [[Amahi 10|Fedora 25]] to [[Amahi 11|Fedora 27]] | ||
− | + | * [[Amahi 9|Fedora 23]] to [[Amahi 11|Fedora 27]] | |
− | + | * [[Amahi 8|Fedora 21]] to [[Amahi 12|Fedora 27]] | |
− | < | + | * [[Fedora 19]] to [[Amahi 11|Fedora 27]] |
+ | |||
+ | * [[Ubuntu|Ubuntu 12.04.x LTS]] to [[Amahi 11|Fedora 27]] | ||
+ | <br /> | ||
+ | Currently there '''IS NOT''' an automated upgrade path for Ubuntu or a method for backing up current HDA settings for a reinstall. It is a manual process! However, we have provided a script to capture most of the settings you will need for a new Amahi HDA. We hope this will make it a more manageable task than it has been in the past.</p> | ||
+ | |||
+ | == Disclaimer == | ||
+ | <p>Please understand this is a guide to assist you in the migration. There is no guarantee this guidance will work for everyone. While every effort has been taken to accurately document the migration steps, use at your own risk.</p> | ||
== Backup Settings == | == Backup Settings == | ||
<p>As with any other migration process, you will need to back up your HDA settings. In order to make the new system look and feel like your current one, there are certain components we need to capture.</p> | <p>As with any other migration process, you will need to back up your HDA settings. In order to make the new system look and feel like your current one, there are certain components we need to capture.</p> | ||
− | <p>To make this as painless as possible, a script is being provided. Once you run the script, it will record all the important information such as users, shares, apps installed, network, and Greyhole | + | <p>To make this as painless as possible, a script is being provided. Once you run the script, it will record all the important information such as users, shares, apps installed, network, and Greyhole configuration (if installed), and other settings in a text file. You can then copy that file to a safe location for use once the new system is ready to be configured.</p> |
[https://wiki.amahi.org/index.php/Open_Terminal_as_root As root user], do the following: | [https://wiki.amahi.org/index.php/Open_Terminal_as_root As root user], do the following: | ||
* Navigate to the root directory: | * Navigate to the root directory: | ||
cd /root | cd /root | ||
− | * Download '' | + | * Download script for appropriate Amahi version: |
− | wget <nowiki> | + | : |
+ | :<u>Ubuntu 12.04.x</u> | ||
+ | :''u1204_hda_migration.sh'' script (sha1sum 0b65de7520a420b68f137601cdb479784538f762) | ||
+ | wget <nowiki>"http://dl.amahi.org/u1204_hda_migration.sh.txt" -O u1204_hda_migration.sh</nowiki> | ||
+ | :<u>Fedora 19</u> | ||
+ | :''f19_hda_migration.sh'' script (sha1sum 777a27a4aa0f5192420585da0303f0b0defedd8d): | ||
+ | wget <nowiki>"http://dl.amahi.org/f19_hda_migration.sh.txt" -O f19_hda_migration.sh</nowiki> | ||
+ | :<u>Fedora 21/23/25</u> | ||
+ | :''f21_hda_migration.sh'' script (sha1sum 5de37d8a18b9ea51a31c7964da9b7e41b74d34e7): | ||
+ | wget <nowiki>"http://dl.amahi.org/f21_hda_migration.sh.txt" -O f21_hda_migration.sh</nowiki> | ||
+ | |||
* Make it executable: | * Make it executable: | ||
− | chmod 755 | + | : |
+ | :<u>Ubuntu 12.04.x</u> | ||
+ | chmod 755 u1204_hda_migration.sh | ||
+ | :<u>Fedora 19</u> | ||
+ | chmod 755 f19_hda_migration.sh | ||
+ | :<u>Fedora 21/23/25</u> | ||
+ | chmod 755 f21_hda_migration.sh | ||
+ | |||
* Run the script: | * Run the script: | ||
− | ./ | + | : |
− | + | :<u>Ubuntu 12.04.x</u> | |
+ | ./u1204_hda_migration.sh | ||
+ | :<u>Fedora 19</u> | ||
+ | ./f19_hda_migration.sh | ||
+ | :<u>Fedora 21/23/25</u> | ||
+ | ./f21_hda_migration.sh | ||
If all goes well, you will see a message similar to the one below: | If all goes well, you will see a message similar to the one below: | ||
<pre> | <pre> | ||
Line 31: | Line 61: | ||
Copy '''hda_production_migration.txt''' (hereon referred to as ''migration text'') to another machine and view the contents. Ensure all your settings were accurately captured before proceeding to the next section. | Copy '''hda_production_migration.txt''' (hereon referred to as ''migration text'') to another machine and view the contents. Ensure all your settings were accurately captured before proceeding to the next section. | ||
− | You can also print the file to make it easy to follow along as you go through the migrations steps. See [[ | + | You can also print the file to make it easy to follow along as you go through the migrations steps. See [[HDA_OS_Migration_Guide#Additional Tips|Additional Tips]] below for optional steps you may want to complete. |
+ | |||
+ | <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #FFB6C1; margin: 3px 3px 1em 3px;">'''IMPORTANT:''' You will need to document any manual configuration changes or apps installed from sources other than the [https://www.amahi.org/apps Amahi App Store].</div> | ||
== Greyhole Cleanup == | == Greyhole Cleanup == | ||
Line 107: | Line 139: | ||
mount -a | mount -a | ||
If there are any errors, compare with the '''fstab''' section of the ''migration text''. '''DO NOT''' proceed to the next section until all drives are correctly mounted. | If there are any errors, compare with the '''fstab''' section of the ''migration text''. '''DO NOT''' proceed to the next section until all drives are correctly mounted. | ||
+ | |||
+ | To add additional drives to your HDA for Greyhole, please use the Amahi [https://www.amahi.org/apps/disk-wizard Disk Wizard] application which provides a Dashboard UI for this process. The [[Adding_a_second_hard_drive_to_your_HDA|adding a second hard drive]] from command-line documentation is also available. | ||
== Install Applications == | == Install Applications == | ||
− | <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #FFB6C1; margin: 3px 3px 1em 3px;">'''WARNING:''' Some applications may not be ''LIVE'' for the new Amahi supported OS. Also the application version could be newer than you had installed on your previous | + | <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #FFB6C1; margin: 3px 3px 1em 3px;">'''WARNING:''' Some applications may not be ''LIVE'' for the new Amahi supported OS. Also the application version could be newer than you had installed on your previous HDA. As a result, the databases(s) and/or configuration files(s) may not be compatible.</div> |
Refer to the '''INSTALLED APPS TAB''' section of the ''migration text'' to determine applications to install. Any [http://www.amahi.org/faq/if-i-pay-for-an-app-when-your-next-version-comes-out-do-i-have-to-pay-for-your-app-again previously purchased applications] from the [https://www.amahi.org/apps Amahi App Store] will be available for install. | Refer to the '''INSTALLED APPS TAB''' section of the ''migration text'' to determine applications to install. Any [http://www.amahi.org/faq/if-i-pay-for-an-app-when-your-next-version-comes-out-do-i-have-to-pay-for-your-app-again previously purchased applications] from the [https://www.amahi.org/apps Amahi App Store] will be available for install. | ||
Line 125: | Line 159: | ||
We are now ready to being updating the new HDA with our previous HDA settings. Start by selecting ''Setup'' from the Amahi Dashboard main page (<nowiki>http://hda</nowiki>). | We are now ready to being updating the new HDA with our previous HDA settings. Start by selecting ''Setup'' from the Amahi Dashboard main page (<nowiki>http://hda</nowiki>). | ||
− | + | <u>Users Tab</u> | |
:Create ''New users''. Refer to '''USERS TAB''' section in the ''migration text''. | :Create ''New users''. Refer to '''USERS TAB''' section in the ''migration text''. | ||
− | + | <u>Shares Tab</u> | |
:Choose the appropriate section and complete as noted. | :Choose the appropriate section and complete as noted. | ||
:*''Details'' section: Create ''Shares''. Refer to '''SHARES TAB''' section in the ''migration text''. | :*''Details'' section: Create ''Shares''. Refer to '''SHARES TAB''' section in the ''migration text''. | ||
:*''Settings'' section. Update ''Work Group Name'' if needed. Refer to '''SETTINGS''' under the '''SHARES TAB''' section in the ''migration text''. | :*''Settings'' section. Update ''Work Group Name'' if needed. Refer to '''SETTINGS''' under the '''SHARES TAB''' section in the ''migration text''. | ||
− | + | <u>Network Tab</u> | |
:Choose the appropriate section and complete as noted. | :Choose the appropriate section and complete as noted. | ||
:*''Fixed IPs'' section: Create ''Fixed IPs''. Refer to '''FIXED IP''' under the '''NETWORK TAB''' section in the ''migration text''. | :*''Fixed IPs'' section: Create ''Fixed IPs''. Refer to '''FIXED IP''' under the '''NETWORK TAB''' section in the ''migration text''. | ||
Line 142: | Line 176: | ||
::*Change ''DNS Provider'' if needed. Refer to '''DNS PROVIDER''' under the '''NETWORK TAB''' section in the ''migration text''. | ::*Change ''DNS Provider'' if needed. Refer to '''DNS PROVIDER''' under the '''NETWORK TAB''' section in the ''migration text''. | ||
::*Update ''Gateway'' if needed. Refer to '''GATEWAY''' under the '''NETWORK TAB''' section in the ''migration text''. | ::*Update ''Gateway'' if needed. Refer to '''GATEWAY''' under the '''NETWORK TAB''' section in the ''migration text''. | ||
+ | ::*Update ''Dynamic IP Range'' (Fedora 21/23<!--/25--> '''ONLY''') if needed. Refer to '''DYNAMIC IP RANGE''' under the '''NETWORK TAB''' section in the ''migration text''. | ||
− | + | <u>Settings Tab</u> | |
:Enable ''Advanced Settings'' and/or ''Guest Dashboard''. Refer to '''SETTINGS TAB''' section in the ''migration text''. | :Enable ''Advanced Settings'' and/or ''Guest Dashboard''. Refer to '''SETTINGS TAB''' section in the ''migration text''. | ||
Line 153: | Line 188: | ||
If you do not want to use [https://wiki.amahi.org/index.php/Greyhole Greyhole], you can '''SKIP''' this section. | If you do not want to use [https://wiki.amahi.org/index.php/Greyhole Greyhole], you can '''SKIP''' this section. | ||
− | Otherwise | + | Otherwise, you have two options for installing Greyhole: |
+ | |||
+ | <u>Manual</u><br /> | ||
+ | Follow the [[Amahi_Create_Manual_Greyhole_Setup|Manual configuration]] and [[Reconnect existing Greyhole storage pool]] guidance. Refer to '''greyhole.conf''' section in the ''migration text'' as needed.<br /> | ||
+ | |||
+ | or | ||
+ | |||
+ | <u>Automated</u><br /> | ||
+ | Install the [https://www.amahi.org/apps/greyhole-ui Greyhole UI] application. In the Amahi Dashboard, navigate to the '''Drive Pooling''' tab and choose: | ||
* '''Partitions''' section and select the appropriate ''Locations'' for the ''Pool''. Refer to '''greyhole.conf''' section (''storage_pool_directory'' line) in the ''migration text'' to verify the correct partitions are chosen. | * '''Partitions''' section and select the appropriate ''Locations'' for the ''Pool''. Refer to '''greyhole.conf''' section (''storage_pool_directory'' line) in the ''migration text'' to verify the correct partitions are chosen. | ||
Line 162: | Line 205: | ||
::<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">'''NOTE:''' If [https://www.amahi.org/apps/greyhole-ui Greyhole UI] application was installed on your previous HDA, you should refer to '''SHARES TAB''' (''Disk Pool Copies'' column) section in the ''migration text'' to determine the appropriate setting.</div> | ::<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">'''NOTE:''' If [https://www.amahi.org/apps/greyhole-ui Greyhole UI] application was installed on your previous HDA, you should refer to '''SHARES TAB''' (''Disk Pool Copies'' column) section in the ''migration text'' to determine the appropriate setting.</div> | ||
+ | |||
+ | <u>Additional Settings</u><br /> | ||
[https://wiki.amahi.org/index.php/Greyhole#Greyhole_Advanced_Options Greyhole Advanced Options] are configured in ''greyhole.yml'' file (''/var/hda/platform/html/config''). Compare the contents with the '''greyhole.yml''' section in the ''migration text'' for any differences. Make changes as needed. | [https://wiki.amahi.org/index.php/Greyhole#Greyhole_Advanced_Options Greyhole Advanced Options] are configured in ''greyhole.yml'' file (''/var/hda/platform/html/config''). Compare the contents with the '''greyhole.yml''' section in the ''migration text'' for any differences. Make changes as needed. | ||
+ | <u>Verify Operational</u><br /> | ||
Before proceeding to the next section, verify Greyhole is working properly. This can be done by monitoring the log: | Before proceeding to the next section, verify Greyhole is working properly. This can be done by monitoring the log: | ||
tail -f /var/log/grehole.log | tail -f /var/log/grehole.log |
Latest revision as of 01:04, 13 December 2021
The purpose of this tutorial is to provide a method for migrating Amahi HDA settings from one Amahi supported OS to another via a new install, such as:
Currently there IS NOT an automated upgrade path for Ubuntu or a method for backing up current HDA settings for a reinstall. It is a manual process! However, we have provided a script to capture most of the settings you will need for a new Amahi HDA. We hope this will make it a more manageable task than it has been in the past.
Contents
Disclaimer
Please understand this is a guide to assist you in the migration. There is no guarantee this guidance will work for everyone. While every effort has been taken to accurately document the migration steps, use at your own risk.
Backup Settings
As with any other migration process, you will need to back up your HDA settings. In order to make the new system look and feel like your current one, there are certain components we need to capture.
To make this as painless as possible, a script is being provided. Once you run the script, it will record all the important information such as users, shares, apps installed, network, and Greyhole configuration (if installed), and other settings in a text file. You can then copy that file to a safe location for use once the new system is ready to be configured.
As root user, do the following:
- Navigate to the root directory:
cd /root
- Download script for appropriate Amahi version:
- Ubuntu 12.04.x
- u1204_hda_migration.sh script (sha1sum 0b65de7520a420b68f137601cdb479784538f762)
wget "http://dl.amahi.org/u1204_hda_migration.sh.txt" -O u1204_hda_migration.sh
- Fedora 19
- f19_hda_migration.sh script (sha1sum 777a27a4aa0f5192420585da0303f0b0defedd8d):
wget "http://dl.amahi.org/f19_hda_migration.sh.txt" -O f19_hda_migration.sh
- Fedora 21/23/25
- f21_hda_migration.sh script (sha1sum 5de37d8a18b9ea51a31c7964da9b7e41b74d34e7):
wget "http://dl.amahi.org/f21_hda_migration.sh.txt" -O f21_hda_migration.sh
- Make it executable:
- Ubuntu 12.04.x
chmod 755 u1204_hda_migration.sh
- Fedora 19
chmod 755 f19_hda_migration.sh
- Fedora 21/23/25
chmod 755 f21_hda_migration.sh
- Run the script:
- Ubuntu 12.04.x
./u1204_hda_migration.sh
- Fedora 19
./f19_hda_migration.sh
- Fedora 21/23/25
./f21_hda_migration.sh
If all goes well, you will see a message similar to the one below:
HDA Settings Backup Complete! Filename : hda_production_migration.txt Directory: /root
Copy hda_production_migration.txt (hereon referred to as migration text) to another machine and view the contents. Ensure all your settings were accurately captured before proceeding to the next section.
You can also print the file to make it easy to follow along as you go through the migrations steps. See Additional Tips below for optional steps you may want to complete.
Greyhole Cleanup
If you are not currently using Greyhole, you can SKIP this section.
Otherwise, As root user, begin with emptying the trash:
greyhole -a
Also recommend you run a fsck
to ensure all files are in place:
greyhole -f
Monitor activity via the log file:
tail -f /var/log/greyhole.log
Once it's complete, you can prepare to shutdown your system
Shutdown Preparation
Before powering OFF the HDA, you need to:
- Turn OFF DHCP server on the HDA
- Turn ON your router DHCP/DNS server
- Power OFF any clients that aren't needed
- Renew DHCP lease for clients to remain ON
- Verify all clients have connectivity via the router
- Download new Amahi install image
Once you have the media ready for install, it's time to power OFF your HDA.
As root user, execute:
shutdown now -P
- or
- you can select the Shutdown icon (the RED one) from the HDA Dashboard Settings tab.
Once the HDA is OFF, disconnect all hard drives except the one for the OS. You don't need to remove them, just disconnect the power and drive cables.
New Installation
To begin:
- Power ON your HDA
- Insert installation media (reboot if needed)
- Follow the appropriate Amahi installation instructions
- Once complete, DO NOT disable the router DHCP/DNS server yet.
Validate Success
Once the install is complete, you need to validate the install was successful. Ensure everything is working correctly before proceeding to the next section.
What you should check:
- Does the HDA boot successfully and without errors
- Can you connect to the Amahi Dashboard (http://hda or by IP Address)
- Does the HDA have internet connectivity (try
yum list hda-platform
)
If you have problems, refer to the Network Troubleshooting guide in the wiki.
Once everything appears to be working, you can now disable your router DHCP/DNS server. The Amahi HDA will become your DHCP/DNS server for the network.
Configure Drives
If you do not have any additional drives to connect to your HDA, you can SKIP this section.
Otherwise, you will need to:
- Power OFF the HDA
- Reconnect the power and drive cables
- Power ON the HDA
As root user, edit /etc/fstab:
vi /etc/fstab
- Append entries the end of the file as noted in the fstab section of the migration text. For example:
UUID=b7017251-cb54-438b-92a3-781537c565e6 /var/hda/files/drives/sdb ext4 defaults 1 2 noatime,data=writeback,nofail
- Ensure you DO NOT add any drive lines that contain /, /boot, or swap. For example:
UUID=1ebbf241-528c-465e-889f-acc15400dd8c / ext4 defaults 1 1
- Create directories that correspond the the path in the drive lines. For example:
mkdir -p /var/hda/files/drives/sdb
- indicates a drive listed in /etc/fstab will be mounted at this location.
Once you have all the drives added to /etc/fstab and the directories created, you can then mount the drives.
mount -a
If there are any errors, compare with the fstab section of the migration text. DO NOT proceed to the next section until all drives are correctly mounted.
To add additional drives to your HDA for Greyhole, please use the Amahi Disk Wizard application which provides a Dashboard UI for this process. The adding a second hard drive from command-line documentation is also available.
Install Applications
Refer to the INSTALLED APPS TAB section of the migration text to determine applications to install. Any previously purchased applications from the Amahi App Store will be available for install.
- As you proceed to install applications, compare the version you install with the version listed in the migration text. That will give you an indication if a database or configuration file restore will be successful.
- If you have any database(s) and configuration file(s) saved for applications, you can restore them in most cases. Database(s) can be restored via command line or using a MySQL application such as, Adminer or phpMyAdmin.
- Obviously you don't have to install all the applications you had on the previous system and you can choose to install new ones as well.
- NOTE: You can now manually install any apps from sources other than the Amahi App Store if needed.
Migrate Settings
We are now ready to being updating the new HDA with our previous HDA settings. Start by selecting Setup from the Amahi Dashboard main page (http://hda).
Users Tab
- Create New users. Refer to USERS TAB section in the migration text.
Shares Tab
- Choose the appropriate section and complete as noted.
- Details section: Create Shares. Refer to SHARES TAB section in the migration text.
- Settings section. Update Work Group Name if needed. Refer to SETTINGS under the SHARES TAB section in the migration text.
Network Tab
- Choose the appropriate section and complete as noted.
- Fixed IPs section: Create Fixed IPs. Refer to FIXED IP under the NETWORK TAB section in the migration text.
- DNS Aliases section: Create DNS Aliases. Refer to DNS ALIASES under the NETWORK TAB section in the migration text.
- Settings section:
- Disable DHCP Server and/or DNS Server if needed. Refer to DHCP/DNS SERVER under the NETWORK TAB section in the migration text.
- Update Lease Time if needed. Refer to DHCP Lease Time under the NETWORK TAB section in the migration text.
- Change DNS Provider if needed. Refer to DNS PROVIDER under the NETWORK TAB section in the migration text.
- Update Gateway if needed. Refer to GATEWAY under the NETWORK TAB section in the migration text.
- Update Dynamic IP Range (Fedora 21/23 ONLY) if needed. Refer to DYNAMIC IP RANGE under the NETWORK TAB section in the migration text.
Settings Tab
- Enable Advanced Settings and/or Guest Dashboard. Refer to SETTINGS TAB section in the migration text.
You should now have the majority of your settings restored. Double check to ensure you did not overlook anything before moving to the next section.
Setup Greyhole
If you do not want to use Greyhole, you can SKIP this section.
Otherwise, you have two options for installing Greyhole:
Manual
Follow the Manual configuration and Reconnect existing Greyhole storage pool guidance. Refer to greyhole.conf section in the migration text as needed.
or
Automated
Install the Greyhole UI application. In the Amahi Dashboard, navigate to the Drive Pooling tab and choose:
- Partitions section and select the appropriate Locations for the Pool. Refer to greyhole.conf section (storage_pool_directory line) in the migration text to verify the correct partitions are chosen.
- NOTE: If Greyhole UI application was installed on your previous HDA, you should refer to DRIVE POOLING TAB section in the migration text rather than greyhole.conf section.
- Shares section
- Choose Storage Pool for the applicable Shares. Refer to greyhole.conf (num_copies line) section in the migration text to verify the correct Shares are chosen.
- Select the appropriate Number Copies for Shares. Refer to greyhole.conf section (num_copies line) in the migration text to verify the correct Number Copies are chosen.
- NOTE: If Greyhole UI application was installed on your previous HDA, you should refer to SHARES TAB (Disk Pool Copies column) section in the migration text to determine the appropriate setting.
Additional Settings
Greyhole Advanced Options are configured in greyhole.yml file (/var/hda/platform/html/config). Compare the contents with the greyhole.yml section in the migration text for any differences. Make changes as needed.
Verify Operational
Before proceeding to the next section, verify Greyhole is working properly. This can be done by monitoring the log:
tail -f /var/log/grehole.log
If there is a problem, refer to Greyhole Troubleshooting. Don't forget to install Mount Shares Locally service if needed.
Final Verification
All the settings and configuration changes from your previous HDA should now be complete. Recommend you verify that everything is working as desired. Its best to check things over thoroughly now to prevent an unexpected surprise later.
If something is not working as expected, double check migration text to ensure you didn't make any errors. Depending on the issue, you may need to refer to the Amahi Troubleshooting guidance.
Providing there are no problems, you should now have a fully functional up-to-date Amahi HDA.
Additional Tips
Each HDA is unique as will be the migration to a different Amahi supported OS. There are additional steps you can accomplish to make the transition a bit smoother.
Recommend backing up:
- App database(s) and configuration file(s)
- .bashrc and .vimrc files for each user
- User added terminal scripts
- Screen capture of dashboard tabs