Page 1 of 1
Approach to move MyVesta dns to new machine?
Posted: Fri Jun 23, 2023 7:50 pm
by NordicSnowman
The basics with installing the new setup and importing the backups are clear and no problem.
The issue is with alot of domains pointing to the IP of the old machine, i am looking for a solution so i can do a bulk edit of everything.
Technically i can just do a "sed -i" and replace the IP of all *.db files in /home - but, the serial will not change and i´m a bit worried the cluster wont update?
Or is my fear unnecessary?
Or can i use this? after running a sed -i to replace all ip;s in the zone files?
It happens at least 1-2 times per month that a machine grows out of a VPS and needs to move to a dedicated machine.
But the work with changing all IP;s inside MyVesta is a bit tedious

Started a move just now and i was thinking it must be a easier solution for this i have missed
Or anyone with a smarter approach?
Re: Approach to move MyVesta dns to new machine?
Posted: Sun Jun 25, 2023 8:37 pm
by myVesta
is it cluster DNS or clasical single DNS server?
hint for quick 'forwarding' for http/https traffic -
viewtopic.php?f=20&t=46
Re: Approach to move MyVesta dns to new machine?
Posted: Sat Jul 01, 2023 12:24 am
by NordicSnowman
No thats not a issue, its a DNS-clustered machine.
I will empty NS2 and re-sync it with the new main machine later (ns1).
Both of them will be online while the dns-data changes.
like this
Old server has ip: 111.111.111.111 (this is ns1, master)
New server has ip: 222.222.222.222 (this will be ns1, new master)
When i make a backup on old server and import it to new server, all imported DNS-data will have 111.111.111.111 saved in the DNS config.
I do not want to manually edit 200+ domains changing the IP to the new server.
Is there a smart solution to do this? without manual edit
Re: Approach to move MyVesta dns to new machine?
Posted: Sat Jul 01, 2023 1:26 am
by NordicSnowman
While waiting if someone had a smart suggestion, i was looking around myself.
I checked out all V-CLI-commands without luck, i might have missed one that makes this change?
The "v-normalize-restored-user" was a option, but i found it too late
So what i did.
- I decompressed the dns-folder from all backup files in their own folder named as the account name to keep them separated.
- Used Notepad++ to search and replace in files, replaced 111.111.111.111 with 222.222.222.222 (just nonsense ip;s in this example of course) in all *.db and *.conf files located in dns-folder on each account. (not sure if the .db was needed, but i did it anyway).
- Added the DNS-folder back to the tar-ball with 7zip.
- Uploaded the backup-files to the server and imported
- Done
The new server now has all domains with the new ip, and everything works. Reload of bind works perfect without any issues.
I tried doing the replace inside the tar-file with "sed -i" but it didnt work out as excpected, to save time i just ran with Notepad++ instead.
It took less than a minute per account to replace IP on 200+ domains. I´m happy

Re: Approach to move MyVesta dns to new machine?
Posted: Sun Jul 02, 2023 2:13 pm
by isscbta
We will release a script next month or possibly within two months, which will enable fast and easy migration of one myVesta server to another. This script will have all the necessary options integrated, making it highly useful for situations where you need to quickly and easly scale your server/hardware up or down.
Re: Approach to move MyVesta dns to new machine?
Posted: Sun Jul 02, 2023 10:33 pm
by NordicSnowman
isscbta wrote: ↑Sun Jul 02, 2023 2:13 pm
We will release a script next month or possibly within two months, which will enable fast and easy migration of one myVesta server to another. This script will have all the necessary options integrated, making it highly useful for situations where you need to quickly and easly scale your server/hardware up or down.
Good to hear, we are scaling hardware and changing from vps to dedicated pretty often and its alot of work if there is alot of domains

Looking forward to this!