Changes

From SME Server
Jump to navigationJump to search
655 bytes added ,  13:03, 25 July 2023
m
no edit summary
Line 27: Line 27:     
=== Description ===
 
=== Description ===
This is a suite of script intended to help backup and restore when migrating to another box with same SME version or more recent.
+
This is a script intended to help backup and restore when migrating to another box with the same SME version or newer.
    
It will create an archive similar to the console usb backup, hence allowing console restore at startup directly after install.
 
It will create an archive similar to the console usb backup, hence allowing console restore at startup directly after install.
   −
It will backup all the already known by the script locations for every installed contribs.
+
It will backup all the known configurations and files for every installed contribs.
   −
It will also backup some user space known to have potential manually added files.
+
It will also backup some user space known to potentially have manually added files.
    
It will create a list of rpm currently installed and break them down to ease the install later.  
 
It will create a list of rpm currently installed and break them down to ease the install later.  
   −
A WIP will be to download the rpms from the repos to allow quick reinstall. A script will be used later to allow download from a more recent version.
+
A WIP will be to download the rpms from the repos to allow quick reinstall. Another script will be used later to allow download from a more recent version.
   −
There is also an exclusion list. By default /home/e-smith/files is in this exclusion list So you can have a server backup and restore faster, It assumes you backup those files separately and restore them manually latter (or have them on a separate mount point you can easily remount latter), as the server can boot without them on install.
+
There is also an exclusion list. By default /home/e-smith/files is in this exclusion list so you can have a faster server backup and restore. It assumes you backup those files separately and restore them manually later (or have them on a separate mount point you can easily remount latter), as the server can boot without them on install.
      Line 48: Line 48:  
</tab>
 
</tab>
 
<tab name="For SME 9">
 
<tab name="For SME 9">
  wget https://viewvc.koozali.org/smecontribs/rpms/smeserver-migratehelper/contribs10/migratehelper.sh -O /usr/bin/migratehelper.sh
+
  wget http://viewvc.koozali.org/smecontribs/rpms/smeserver-migratehelper/contribs10/migratehelper.sh -O /usr/bin/migratehelper.sh --no-check-certificate
 
</tab>
 
</tab>
 
</tabs>
 
</tabs>
Line 58: Line 58:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
You can then edit the script and  Add you directories or files to include in the '''dir.list''' section, your exclusion in '''exclude.list''' section. Then check all your contribs are listed, and the associated destination are correct.<syntaxhighlight lang="bash">
+
You can then edit the script and  Add your directories or files to include in the '''dir.list''' section, your exclusion in '''exclude.list''' section. Then check all your contribs are listed, and the associated destination are correct.<syntaxhighlight lang="bash">
 
vim /usr/bin/migratehelper.sh
 
vim /usr/bin/migratehelper.sh
 
</syntaxhighlight>
 
</syntaxhighlight>
   −
Then run the script
+
Then run the script.
 +
 
 +
====Script Options====
 +
 
 +
Usage: [ -t Enable Test mode ] [ -n no-check ] [ -v Version ] [ -h Help ]
 +
 
 +
test mode - does not stop services and run the backup
 +
no-check - don't stop and ask questions
 +
 
 +
 
 
{{Warning box|When starting this script :
 
{{Warning box|When starting this script :
 
it will create the list of files to backup, then it will stop services that could modify your backup
 
it will create the list of files to backup, then it will stop services that could modify your backup
Line 81: Line 90:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
It will then process all the files to backup and display the progress on screen. After creating the definitive list depending on installed rpms, it will then Create a list of rpm installed and breakdown them in two easy to restore lists :
+
It will then process all the files to backup and display the progress on screen. After creating the definitive list depending on installed rpms, it will then create a list of rpm installed and breakdown them in two easy to restore lists :
 
{| class="wikitable"
 
{| class="wikitable"
 
!files
 
!files
Line 203: Line 212:  
smeserver-sme8admin  
 
smeserver-sme8admin  
 
smeserver-sme9admin
 
smeserver-sme9admin
 +
smeserver-smeadmin
 +
smeserver-softethervpn-server
 
smeserver-sysmon
 
smeserver-sysmon
 
smeserver-tftp-server
 
smeserver-tftp-server
Line 248: Line 259:  
First step will be to simply use the console restore with the obtained smeserver.tgz. We expect you handle the transfer either using a USB disk, or by having used sshfs and already mounted one extra partition of your new server to your old to create you archive on.
 
First step will be to simply use the console restore with the obtained smeserver.tgz. We expect you handle the transfer either using a USB disk, or by having used sshfs and already mounted one extra partition of your new server to your old to create you archive on.
   −
Second use the configuration console to fixe any changes needed on network card or IP, domain name...
+
Second use the configuration console to fix any changes needed on network card or IP, domain name...
    
Third you can use the saved list of rpm to try to install your contribs and other missing things
 
Third you can use the saved list of rpm to try to install your contribs and other missing things
Line 257: Line 268:     
Fourth, you can start a rsync for the missing bits
 
Fourth, you can start a rsync for the missing bits
   rsync -arv root@oldsme:/home/e-smith/files/ibays/ /home/e-smith/files/ibays
+
   rsync -aArv root@oldsme:/home/e-smith/files/ibays/ /home/e-smith/files/ibays
   rsync -arv root@oldsme:/home/e-smith/files/shares/ /home/e-smith/files/shares
+
   rsync -aArv root@oldsme:/home/e-smith/files/shares/ /home/e-smith/files/shares
   rsync -arv root@oldsme:/home/e-smith/files/users/ /home/e-smith/files/users
+
   rsync -aArv root@oldsme:/home/e-smith/files/users/ /home/e-smith/files/users
   rsync -arv root@oldsme:/home/e-smith/files/nextcloud home/e-smith/files/nextcloud
+
   rsync -aArv root@oldsme:/home/e-smith/files/nextcloud home/e-smith/files/nextcloud
 
or simply  
 
or simply  
   rsync -arv root@oldsme:/home/e-smith/files/ /home/e-smith/files
+
   rsync -aArv root@oldsme:/home/e-smith/files/ /home/e-smith/files
 
Some might enjoy to get back their old log too
 
Some might enjoy to get back their old log too
   Line 269: Line 280:  
=== Uninstall ===
 
=== Uninstall ===
 
  yum remove {{#var:smecontribname}}
 
  yum remove {{#var:smecontribname}}
 +
 +
=== Issues ===
 +
 +
==== Certificate ====
 +
If you experience issues with certificates
 +
 +
https://vault.centos.org/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] Peer cert cannot be verified or peer cert invalid
 +
 +
cd /etc/yum.smerepos.d
 +
nano sme-base.repo
 +
 +
Add this to the relevant sections:
 +
 +
sslverify=0
 +
 +
(Do not run yum-modify as it will overwrite this)
 +
 +
Save and then re-run the migratehelper.
    
=== Bugs ===
 
=== Bugs ===
19

edits

Navigation menu