Backup from Ubuntu disk image

This is a little complex, but one of my Countly servers is inaccessible.... long story short, it's a VM running in Azure, and this is a bug that happens with Ubuntu version 15. I may be able to upgrade the machine to 16 by connecting the disk to another Ubuntu VM...

What I'm wondering is, if I connect the disk to another VM, if there is a way to copy or backup the Mongodb data to a new instance.

  1. Setup new version 16 of Ubuntu server
  2. Shut down Ubuntu 15 VM, disconnect disk
  3. Attach v15 disk to running v16 instance
  4. copy/import mongodb files to v16

Has anyone done anything like this?

0

Comments

6 comments
  • Hi Paul,

    Backing up Countly instance and then restoring this backup to another Countly instance is straightforward using countly command line.

    You can follow instructions here step by step:

    Let me know if you have any questions and I'd be happy to help.

    0
    Comment actions Permalink
  • These commands are great if I can get into the machine, however, I cannot, so I'm not sure if these commands are helpful.

    Basically if you shut down the server, take the disk out, plug it into another machine, how can I export the data on the first disk into a mongodb server for example?

    0
    Comment actions Permalink
  • What directory are the mongodb database files stored?

    0
    Comment actions Permalink
  • Ok, looks like they are stored in /var/lib/mongodb I'll stand up a new VM and see if I can copy these files over.

    0
    Comment actions Permalink
  • Have you been able to recover?

    0
    Comment actions Permalink
  • No, I've abandoned the idea of trying to save the historical, and just collecting new going forward on the new server.

    0
    Comment actions Permalink

Please sign in to leave a comment.