How would you go with moving a website and all of it's settings (dns, ftp, email) from one account to another? So this is everything on one server but it's created under separated ispconfig accounts. Let's say client1 and client2 and there is website2.com under client2 account. Now I would like to move website2.com under client1 account and delete client2 account. Is there any simple/fast way to move/migrate the website to client1 account since everything is on the same server and ispconfig panel, or I would have to go old regular route of downloading/backup files and database, delete client2 and recreate everything for the website (dns, ftp, email) under client1 account. I don't even know if it's possible to create the website2.com under client1 first and then delete client2 as that could cause dns conflict but otherwise it will make the website offline for those 15-20 min during migration.
Moving files should at least be easy without making your website offline by using command like rsync, cp or scp, but of course you would normally have to make sure the target website folder is already created before you proceed. I have no experience with moving dns and mail, so wait for others to response to that.
My usual process of moving website from one hosting to another is creating the website, and dns records on new hosting and then moving files and db from old hosting, after the move i point dns records to new server ip before changing NS at the domain register. The things here are a bit different because it's on same server, so I thought I ask first as creating website2.com under client1 account before deleting it from client2 account: It would make duplicate symlink under /var/www/website2.com and it could possibly create duplicated DNS records which could lead to breaking other settings and possibly let's encrypt ssl.
Where is the problem when both clients are on the same server and why do you manually want to move files manually and create a new site etc.? Just change the client in the website settings, email domain settings and DNS zone settings.
The client have two websites on one account then he went apart with his partner and wanted to move one website to different account, I didn't know what approach to take on moving the website from one account to another, and if I didn't ask I wouldn't even know that there is an option to change the client in the website settings. Thank you very much for the help till. Just a question, will this change the path of the website under /var/www/ and do I need to do Resync after the change?
So I changed everything from client2 to client1 and I did it by changing client in the website settings. But there's a problem. Now both accounts can see websites, database and ftp, they are not removed from client2, so client2 can still see them, and client2 can still control website settings while client1 can't. Let's say I want to change the Harddisk Quota, and normally now client1 should be the one owning the website but when I change it, nothing happens. When I login back to client2, I can change it and it accepts the changes. client2 shouldn't even be able to see the website anymore.
Edit the record in the web_domain table and change the sys_userid field to the userid of the new client. You can look up the userid in the sys_user table.
@Taleman Yes I did try to do Resync but it didn't do anything. What @till suggested worked out fine. I found that I need to change sys_userid on ftp_user, web_database, web_database_user and web_domain tables for everything to be migrated to client1. Thanks for pointing that out @till