Migrate a snap between 2 server / vm - error: cannot communicate with server: timeout exceeded while waiting for response

Hello community

I’m trying to move a snap deployed application from an old ubuntu 20.014 VM to a fresh 24.04 (…) :

  1. created a snapshot of the app data with snap save on the old vm
  2. exported the created snapshot to a zip file (a heafty one 50gb)
  3. scp transfered the exported zip on the new vm
  4. installed the app on the new vm
  5. when I tried to import the zip on the new vm with snap import-snapshot → I got this error message : error: cannot communicate with server: timeout exceeded while waiting for response

For reference, I used this same process to migrate the same app (but obvisouly with less data) in a similar test environement (OS version, vm HW, app ver, snap channel, … ) and it worked like a charm.

Can you please help with this scenario or suggest any other migration method beside using the application backup/restore process … (as that would go against the definition af a snapd packaged app …)

Thanks

I didn’t ever use snap import-snapshot so I can’t help, but had success in the past with snap save and snap restore (example: save and restore)

Did you try if that workflow works locally on your 24.04 VM ?

Like install a snap, snap save, snap export-snapshot, snap forget, and then snap import-snapshot

Hey @mrk I do need the export-snapshotimport-snapshot thing between the save and restore because, literraly I’m moving the snapshot to another machine…

I’m not sur on this machine - I’ll have to check - otherwise yeah I’ll give it a try but for sure on the lab environement I did that multiple times without any issues or whatsoever

@mrk @A333 Quick Update: I’ve just tested in lab the cp move snapshot thing - It worked ! I’ll post updates later for my prod environment - can’t wait to test that in prod Now - I’m confused - what’s the point of making these two (export / import) cmds ?? (if we can just cp / mv the zip snapshots !!)

1 Like

Hey @mrk it worked like a charm I used the zip file created by the snapshot command My import-snapshot step was just an overkill ! Thnks for pointing out this path.

glad it worked, I also used this method to move data between machines and it was quite painless