Restore fails to restore ALL virtualmin settings from virtualmin pro to virtualmin pro

Hello,

I think I did this backwards: I posted to the community first, but according to the support page I should have filed here first.

I am trying to replicate a virtualmin pro server internally for testing. server information:

Production Server Info:

  • OS: Ubuntu 12.04.5 LTS
  • Virtualmin Version: 5.03 Pro

Test Server Info:

  • OS: Ubuntu 16.04.1 LTS
  • Virtualmin Version: 5.03 Pro

The biggest difference is going from ubuntu 12.04 lts (production) to 16.04 lts (test). However, the reseller account is not being generated on the test server. I do want this to happen.

I see the reseller accounts being backed up, so they are in the backups...why aren't they being restored?

The gui restoration shows the same messages as the commandline which is virtualmin restore-domain --source /root/virtualmin.tar.gz --all-domains --all-features --all-virtualmin

Also of note is that there are 9 items being backed up, but only 7 items being restored.

I COULD create a reseller by hand on the test server. But I would really like to know why the reseller account won't restore. Is it something that changed with ubuntu 16.04 lts?

Backing up the virtualmin settings on the production server gives the following messages:

Starting backup of 9 Virtualmin configuration settings to local file /tmp ..


    Saving Virtualmin configuration ..
    .. done

    Saving templates and plans ..
    .. done

    Saving resellers ..
    .. done

    Saving email templates ..
    .. done

    Saving custom fields, links, categories and shells ..
    .. done

    Saving custom script installers ..
    .. done

    Saving custom styles ..
    .. done

    Saving scheduled backups ..
    .. done

    Saving DKIM settings ..
    .. done

    Saving greylisting settings ..
    .. not installed

    Save mail rate limiting configuration ..
    .. not installed

    Saving mail server configuration ..
    .. done

.. done

9 Virtualmin configuration settings backed up successfully.

Backup is complete. Final size was 15.19 kB.

Here are the restoration messages:

Starting restore of 7 Virtualmin settings from local file /root/virtualmin.tar.gz ..

Extracting backup archive file ..
.. done

Restoring Virtualmin settings ..

    Restoring Virtualmin configuration ..
    .. done

    Restoring templates and plans ..
    .. done

    Restoring email templates ..
    .. done

    Restoring custom fields, links, categories and shells ..
    .. done

    Restoring custom script installers ..
    .. done

    Restoring scheduled backups and keys ..
    .. done

    Restoring DKIM settings ..
    .. not installed

    Restoring greylisting settings ..
    .. not installed

    Restoring rate limiting settings ..
    Restoring mail server configuration ..
    .. done

.. done

.. restore complete.
Status: 
Closed (works as designed)

Comments

Title: Restore failes to restore ALL virtualmin settings from virtualmin pro to virtualmin pro » Restore fails to restore ALL virtualmin settings from virtualmin pro to virtualmin pro

The only way I can see this failing is if the backup file /root/virtualmin.tar.gz doesn't contain a virtualmin_resellers file inside it.

If you run tar tvf /root/virtualmin.tar.gz , what output do you get?

reseller name is "creative"

output of tar -tzvf virtualmin.tar.gz:

-rwx--x--x root/root      7734 2016-06-02 16:01 virtualmin_config
-rw-r--r-- root/root         0 2015-03-12 10:06 virtualmin_custom
-rw-r--r-- root/root         0 2015-03-12 10:06 virtualmin_custom_linkcats
-rw-r--r-- root/root         0 2015-03-12 10:06 virtualmin_custom_links
-rwxr-x--- root/root       910 2015-02-18 12:09 virtualmin_custom_shells
-rw-r--r-- root/root     20480 2016-08-02 10:50 virtualmin_email
-rw-r--r-- root/root         2 2016-08-02 10:50 virtualmin_mailserver
-rw-r--r-- root/root        86 2016-08-02 10:50 virtualmin_mailserver_dkim
-rw-r--r-- root/root        10 2016-08-02 10:50 virtualmin_mailserver_grey
-rw-r--r-- root/root      1886 2016-08-02 09:39 virtualmin_mailserver_maincf
-rw-r--r-- root/root      6124 2015-03-17 14:47 virtualmin_mailserver_mastercf
-rw-r--r-- root/root        10 2016-08-02 10:50 virtualmin_mailserver_ratelimit
-rw-r--r-- root/root     20480 2016-08-02 10:50 virtualmin_resellers
-rw-r--r-- root/root     10240 2016-08-02 10:50 virtualmin_scheds
-rw-r--r-- root/root     10240 2016-08-02 10:50 virtualmin_scripts
-rw-r--r-- root/root     20480 2016-08-02 10:50 virtualmin_templates
-rw-r--r-- root/root         0 2015-03-12 10:06 virtualmin_templates_global
-rw-r--r-- root/root     10240 2016-08-02 10:50 virtualmin_templates_plans
-rw-r--r-- root/root     10240 2016-08-02 10:50 virtualmin_templates_skel_0

subsequent output of tar -tvf virtualmin_resellers:

drwx------ root/root         0 2016-08-02 10:50 ./
drwx------ root/root         0 2016-08-02 10:50 ./creative.acls/
-rw-r--r-- root/root       215 2016-08-02 10:50 ./creative.acls/bind8
-rw-r--r-- root/root         0 2016-08-02 10:50 ./creative.acls/apache
-rw-r--r-- root/root       192 2016-08-02 10:50 ./creative.acls/mailboxes
-rw-r--r-- root/root       525 2016-08-02 10:50 ./creative.acls/virtual-server
-rw-r--r-- root/root       658 2016-08-02 10:50 ./creative.acls/virtualmin-awstats
-rw-r--r-- root/root      5179 2016-08-02 10:50 ./creative.acls/syslog
-rw-r--r-- root/root      2182 2016-08-02 10:50 ./creative.webmin

further info, also posted to the forum:

I quickly installed virtualmin pro on a ubuntu 14.04 machine, and restored the same virtualmin.tar.gz file to it: it said it restored 10 items (!) but it did restore the reseller...

Starting restore of 10 Virtualmin settings from local file /root/virtualmin.tar.gz ..

Extracting backup archive file ..
.. done

Restoring Virtualmin settings ..
Restoring Virtualmin configuration ..
.. done
Restoring templates and plans ..
.. done

Restoring resellers ..
.. done

Restoring email templates ..
.. done

Restoring custom fields, links, categories and shells ..
.. done

Restoring custom script installers ..
.. done

Restoring scheduled backups and keys ..
.. done

Restoring DKIM settings ..
.. not installed

Restoring greylisting settings ..
.. not installed

Restoring rate limiting settings ..
Restoring mail server configuration ..
.. done

.. done
Re-loading Webmin ..
.. done

.. restore complete.

Also, it will not be difficult to create a login for you if you want to play in my ubuntu 16 sandbox...

Sure, a remote login to a system that's having this problem would be really useful!

Howdy Jamie,

If you have an ssh public key you can send, I can incorporate it...

--jason

Sure, here is my public key :

ssh-dss AAAAB3NzaC1kc3MAAACBALPtrQgus8wMeTrxiQREVKNGK1b8S9MLcsVngXsaNL2IpzHzajjDxEhkxARlpREFdvhPB9XEMa8IYVRmScyYaAMoespibzq1A24kcBQ3iLDrgoTb/UiRxv7c84WhQud1YpbteKpcpfG582wste+3FqkzvQ6pbNcI0Kkuruhb0s+HAAAAFQDDRVRFXdmNFNR+N3D/XwkIAb7hhQAAAIB0GN+AIuA9OonKbJpgoKz3TKhWNf6DAm39y8Zb//zMaK8/Lc1FMpOsNI/R4Y6LPvCJeAyDXuf/5OT3+613xu70bSSUi2g4UXA6RM/PlSUhdEH4XmG8SoB9abaIObU2AkH84Dkf25qVlSRAL/5aU/R7InXk7jJYFD+cz7vau/4jKAAAAIA1keU19UdRAzUKpbHFotBso8UnQzurcoFWNq8YtjkV9x32sjHuatab+mSXvjjSV9VDZ1Ru+6h5q/Vf6tr4yUuAYIo9s9LGA/MQgOVl7k+Dsn6N9UCta8/yoDXPMBbYQoiUJ2sOQ0pCaPeYXH6WTbB9edgxRow8WFQjGW26t6cF5Q== dsa-key-20031024

Hello Jaime,

I have sent you email at your email posted at webmin.com. Hopefully that's all you need...

--jason

I had a quick look, and I see the problem - your system isn't running Virtualmin Pro, and so it doesn't support reseller accounts.

How strange: I used the setup batch script for the licensed version. Lemme force it, and I will report my findings.

Ok, looks like it might work once I explicitly tell virtualmin to upgrade to pro. Afterwards, I had to remove duplicate entries from the source.list file (ubuntu/debian)...

Looks like the installation as described above with the install.sh didn't actually do the virtualmin pro installation properly. I will restore a snapshot (pre-virtualmin) and begin anew.

That seemed to fix it: installed virtualmin, upgraded to pro, restored files.

I think the word "duh" comes to mind.

Thank you for your efforts, and patience!

I will attempt to close this task. If I fail, please go ahead and close it...

--jason

Status: Active » Closed (fixed)

Glad to hear that worked, thanks for letting us know!

Feel free to let us know if you have any additional questions.

Similar issue here but I am running Virtualmin Pro. I have the reseller account option available in my raw installation however when I go to retrieve my backup from my Amazon S3 bucket and restore it choosing all available options checked, I get a warning saying that the reseller account doesn't exist and it can't restore any of my virtual servers!! Shouldn't it have restored the checked virtualmin settings BEFORE trying to import any virtual servers??

Tomtreas - assuming you selected to restore everything in your backup, resellers should already be re-created before any domains are restored. What's the exact error message you're getting?

Sorry to add to workload but I just setup a new virtual machine to use as a "hot backup" of our main Virtualmin Pro server. I can confirm this "bug" still remains. I followed restore docs on vm

  1. Setup new vm
  2. Installed virtualmin pro (as this is a backup only - hopefully it won't trigger any issue on your end seems as though it is technically a "2nd install")
  3. yum update to same state OS wise as live server (currently CentOS Linux 7.7.1908)
  4. Logged in to backup virtualmin - Backup and Restore > Restore Backup
  5. Selected folder containing all virtual server backups - including virtualmin settings
  6. Got error that could not proceed because of missing reseller account (we have 1 reseller account only)
  7. (FIX) - Manually created reseller account on backup Virtualmin
  8. Run restore sequence again (from step 4 above) - It runs as expected

For step 4, did the backup that you restored also contain all global Virtualmin settings? This is selected using the "Virtualmin settings to also backup" checkboxes on the backup form, and is what causes resellers to be included.

Actually I just looked at the backup schedule that I have had setup for ages and it has the radio button selected "Backup all features" but at some point I must have had an issue as I see all boxes below ticked except for "Reseller accounts" so that would be my issue. Question would be why is that the case, I'll need to update to include that feature/setting and see all is ok. That would seem to however be a minor ui glitch for the "Backup all features" radio to be selected and then individual options below that also selected.

Closing as I believe if I had reseller accounts enabled to backup it should have worked. Will re-open if next backup this throws an error.