Restore only a sub-domain?

Hi

On a server I have a client for the domain toto.com. It has also in it the subdomain titi.toto.com. Customer is going to host somewhere else the toto.com and so I keep only the titi.toto.com subdomain.
I did a complete backup in virtualmin of the titi.toto.com but when I try to restore it on new server it fails stating that toto.com doesn’t exist already !
Is there a way to restore it without the top domain ? I have some customers where I host only a sub-domain and it’s not a problem usually in Virtualmin.
I looked at documentation of Virtualmin but I can find nothing about restoring only a sub-domain :frowning: Isn’t it possible ?

Thanks

Vincèn

Convert the sub server to a top level domain, that should do the trick however you have deleted the parent domain so restore that from a backup then split the domains

1 Like

I first want to make clear that a “subdomain” is not the same as a “sub-server”. A sub-server is about ownership and has nothing to do with the name. When you say “subdomain” no one can know what you’re talking about with confidence. I’m inferring it to be a sub-server, based on context.

A subdomain (in Virtualmin) is just a name, and can be any kind of website (Virtual Server, Sub-Server, Alias). If you create it as a sub-server and then back it up, it will need its parent when restoring, because it’s a sub-server (owned by the parent Virtual Server, and thus not having its own user/home, etc.). If you want to make it not a sub-server, ideally you’d convert it to a top-level server before backing it up.

If you can’t do that, then restore the top-level server first, then restore the sub-server, then convert that to a top-level server, and finally delete the now unneeded original parent server.

You might be able to create a top-level server with the same name and restore into that, but I’m not super confident about that. I’m not sure if any domain ID connections exist in the backups, or if everything is name-based in the backups. But, I guess try it and see, if none of the known-working methods will work for some reason.

Hi

Thanks at you two for your answers :slight_smile: Sorry for the wrong spelling as I was for sure speaking of sub-server and not sub-domains :smiley:
@Joe: thanks for the info that it needs it’s “parent” to be restorable. I have so migrated the sub-server into a main server on the old virtualmin setup and then I have backuped it this way so should restore without problems once I have finished to transfer the archive to new server :slight_smile:

Thanks again for help,

Vincèn