Koozali.org: home of the SME Server

Hooray, SME Ten is here, now I just... how do I .... Oh dear.....

Offline FreakWent

  • ***
  • 85
  • +0/-0
I can only say THANK YOU to all you worked so hard to get SME 10 over the line, I've been with the distro since version 4 and i think it has potential for a bright future!

However, I'm a bit stuck.... I have an installation of version nine but it's in the cloud.... I have a new installation of version ten, also in the cloud....

I do existing backups via rsync.  I've done a dd of the system as part of my investigation, so I know this works, but how to get to back into V10?

So how do I do the backup/restore data migration?  I can't use fuse to backup to a ssh-mounted filesystem because I can't make SME 9 update or install anything (obviously).

My cloud provider has a feature allowing a disk to be attached/detached, but it's not available for my servers' region.

I spent a really long time trying to do fancy port forwards to my home server to get CIFS and/or NFS mounts to work, and got smbclient to work but I couldn't get it mounted.  Eventually the sun came up, so I gave up on this approach.

So experienced experts, remembering that there's more than one way to do it, what approach is the most sensible?

 - Force FUSE support into SME 9 and do a backup/restore via a fuse-mounted mount point (rpm expert method)
 - Setup ridiculous multi port-forwards to force NFS or CIFS to work via some Frankenstein localhost thingy (network ninja method)
 - Sigh and do the snapshot-create-migrate tango in cloudspace to move both hosts across the globe, mount a drive, do the deed and clone the new one back again (web-clicky method)

Or what other clever method exists that I haven't thought of?


Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Hooray, SME Ten is here, now I just... how do I .... Oh dear.....
« Reply #1 on: December 01, 2021, 10:56:55 AM »
The servers are "in the cloud" but are they on different VPS or the same eg Proxmox (which is a very handy solution for multiple VMs)

You could use something like MigrateHelper which will create a backup file with JUST the config entries which you can restore to a v10, and then sshfs the /home/ dirs across with users/emails/ibays after.

https://wiki.koozali.org/Migratehelper

So toughly:

Copy your v10 public key to v9 so you can sshfs or rsync and test you can get in.

Shutdown your v9 services

Run the Migrate script on v9

scp/rsync the backup tgz from v9 to v10 (from the v10 end)

Restore the tgz.

scp/rsync/ssfs the /home hierarchy with users/ibays from v9 to v10

Make sure you post-upgrade, and then run network configuration on reboot to make sure you network devices are set up correctly.

Welcome to v10.

That should keep you busy for a bit :-)

There may be other ways depending on where your VMs, are but that is the first that springs to mind.

If they are both on a Prox machine you can mount the 'old' server as a drive and use copyfromdisk something lie this

https://wiki.koozali.org/UpgradeDisk

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Online Jean-Philippe Pialasse

  • *
  • 2,744
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Hooray, SME Ten is here, now I just... how do I .... Oh dear.....
« Reply #2 on: December 01, 2021, 12:59:58 PM »
while available from epel, ignore fuse.

just use sshfs or simple rsync. 
search the known issue on the release wiki page about ssh, because by default old sme and new do not use the same encryption and you need to enable temporaly a common one either on client side or server.

but for the initial restore you have two way:
- use rescue system to partition disk having one partition left with smeserver.tgz on the extra partition. then during the cd install use the partition tool to ask to keep the existing extra partition and manually assign the boot and /.

- alternatively you could use the second step directly, then either rsync the backup during the installation if network is configured using the extra terminals available or simply configure new sme 10 at the end of process and do the restore at a later stage. you have access to this in console as long as you do not add any group. 

of course for that you will need kvm or virtual kvm to be able to use the installer. 

alternative, when no kvm available, is also using centos2sme on a provider’s installation of centos 7 with the backup archive on an extra partition again.

you can also dd a local version of sme 10 to the cloud machine if a rescue system is available, then chroot to the sme configure it and rebuild the initrd with needed module to boot, then same way restore using the archive on a separate partition. with is only for really advanced linux admin.

Offline FreakWent

  • ***
  • 85
  • +0/-0
Re: Hooray, SME Ten is here, now I just... how do I .... Oh dear.....
« Reply #3 on: December 03, 2021, 02:05:55 AM »
This is great! I can handle both of these, but just to note, I have no sshfs at all on 9.

Never mind though, I think the https://wiki.koozali.org/Migratehelper will do the job.  I'll start with that and report back here later, hoping that it will help someone else.

EDIT: didn't get far.

# yum --enablerepo=smecontribs install smeserver-migratehelper
Loaded plugins: fastestmirror, post-transaction-actions, smeserver
Setting up Install Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base


hmmm.....

yum --disablerepo=base --disablerepo=updates update

That worked, got rid of the errors, but still I get


"No package smeserver-migratehelper available."

migrationtools exists, but that's not it.

But wait! yum is working again now, so maybe....


"No package fuse-sshfs available."

nope.

This isn't even about the restore, I can't even make a backup to start with.  :(

I'll keep trying and report back.



EDIT -- I was follwing SME 10 instructions, there's a tab to click on the migratehelper wiki page.

(LOL --   Issued certificate has expired at viewvc.koozali.org )

Script fails with
tar: /home/e-smith/home: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

So I removed /home/e-smith/home from the list.



« Last Edit: December 03, 2021, 02:58:21 AM by FreakWent »

Online Jean-Philippe Pialasse

  • *
  • 2,744
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Hooray, SME Ten is here, now I just... how do I .... Oh dear.....
« Reply #4 on: December 03, 2021, 05:43:38 AM »
This is great! I can handle both of these, but just to note, I have no sshfs at all on 9.
but you have on SME10, then mount from sme 10 !



Never mind though, I think the https://wiki.koozali.org/Migratehelper will do the job.  I'll start with that and report back here later, hoping that it will help someone else.

EDIT: didn't get far.

# yum --enablerepo=smecontribs install smeserver-migratehelper

EDIT -- I was follwing SME 10 instructions, there's a tab to click on the migratehelper wiki page.

yes, please read before doing :)


(LOL --   Issued certificate has expired at viewvc.koozali.org )

not quite, your SME9 is not able to handle the certificate



Script fails with
tar: /home/e-smith/home: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors


this is not an error. this is a warning, you archive has been created even with those warning

Offline FreakWent

  • ***
  • 85
  • +0/-0
Re: Hooray, SME Ten is here, now I just... how do I .... Oh dear.....
« Reply #5 on: February 06, 2022, 04:51:24 AM »
No, I have no sshfs on SME ten either.  sshfs isn't available via yum.


Aha!!

https://wiki.koozali.org/Epel#For_SME_10.x

« Last Edit: February 06, 2022, 04:58:09 AM by FreakWent »

Online Jean-Philippe Pialasse

  • *
  • 2,744
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Hooray, SME Ten is here, now I just... how do I .... Oh dear.....
« Reply #6 on: February 06, 2022, 05:02:47 AM »
you should rather use https://wiki.koozali.org/Extrarepositories as stated on top of the page

and by using repo with release number in it you make updates harder. should rather use the variable for release as done in extrarepositories pacakages.
« Last Edit: February 06, 2022, 05:05:10 AM by Jean-Philippe Pialasse »