Jump to content
Froxlor Forum
  • 0

[solved] swapping domain(s) from one customer to another


df8oe

Question

Hi to all,

I do have some domains working with froxlor which are owned by customer xx. Now these domains including the mail accounts must be seperated and added to user yyy on my server. I have not seen any possibility to do this "automated". Before I damage all I am asking here ;)

I would start this like this:

- copy all folders containing website stuff from folder /var/kunden/www/xxx to /var/kunden/www/yyy

- chown all the files and folders to user yyy

- changing possibly static paths in any php (or similar) settings from /var/kunden/www/xxx/ to /var/kunden/www/yyy/

- delete domain in froxlor panel from user xxx

- create domain in froxlor panel for user yyy (including lets-encrypt settings and so on)

Hopefully this will do it for running the websites again.

But now there are the email addresses, which are running on dovecot. There are 5 email addresses with hundreds of emails present which must move from xxx to yyy. I am not sure how to manage that. Possibly this way?

- after moving domain from xxx to yyy creating email address in froxlor panel for user yyy

- moving complete dovecot-folder from /var/kunden/mail/xxx/ to /var/kunden/mail/yyy/

- chowning the folders and files

?? can this do the job??

 

Best regards

df8oe

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Very nice feature - I haven't recognized before...

Some questions about it:

 

1) databases

What happens to databases? Are they moved, too? Are they renamed? What about the passwords for databases?

 

2) emailadresses

Are they moved, too? Passwords are transferred? New empty mail structure folders created? If so: Can I simply move the contents of the old mailfolder to the new position and change owners to keep old mails alive?

 

3) webcontent

Is old configuration (lets encrypt, target folders) transferred unmodified so that I only must match the paths to new position? Of course everything in the webcontents itself must be aligned manually, too.

 

Froxlor is very mighty ;)

Link to comment
Share on other sites

  • 0

1) databases

why should databases be moved when you move a DOMAIN from one customer to another? Short answer: no

2) emailaddresses

no, not moved, it basically just changes the owner of the domain itself - so at best, the old customer should not have any email addresses connected - they will be orphans after that

3) webcontent

the domains settings remain fully. The path of the documentroot should be updated to the new customers docroot IF the value is empty (or you set it manually to the correct docroot)

Link to comment
Share on other sites

  • 0

Databases should be moved, too because of many CMS only work using databases. Of course it is possible to use old database settings - but in this case the old owner can access the database which is not intended. I will take a look if I can solve that by changing the froxlor database settings via phpmyadmin @root to swap ownership to new customer. Or simply make a backup of database, remove old database and create a new one at new customers settings...

Emailaddresses should move, too because they are part of that a user calls "domain". So I will take a look if I simply can move dovecot folders to new customer and change permissions. then I will change settings via phpmyadmin in froxlor database.

There is already much work done when all domain related settings are migrated. Setting path by hand is much less problem.

 

Many thanks for your help and informations - all that will make process easier :)

Link to comment
Share on other sites

  • 0
10 minutes ago, df8oe said:

Databases should be moved, too because of many CMS only work using databases.

No. Moving domain means exactly that...not "maybe the database too because you possibly use some cms that wont work afterwards"

12 minutes ago, df8oe said:

Emailaddresses should move, too because they are part of that a user calls "domain".

eh no. What about email-accounts? passwords? etc. all this would be reset for the new owner...no man. This was intended fo the new customer to be a like a "new" domain

Link to comment
Share on other sites

  • 0

That is dependent to the sight of view. I can understand your state - but in the case a full working domain and everything that is related to it shall move from one customer to another databases and emails must be moved, too. In my case there is a "eingetragener Verein" who owns some domains is splitted up to two "eingetragene Vereine" and so some domains must move to new customers. There is no problem by hijacking anything - it must be a clear splitting up for *the future*. If they do not trust each other email passwords can be changed in the froxlor panel for each customer by himself. I will investigate and maybe it is not as difficult. I already have taken a look at the related froxlor databases and I think it is little changing within them.

Link to comment
Share on other sites

  • 0

My intention is every time "first English". I am working as maintainer for an amateur radio firmware project hosted on github and if we want to get contributors we must speak English. I think froxlor is a piece of software that is used all over the world so maybe the problem is in interest of English speaking pepole, too...

Link to comment
Share on other sites

  • 0

I have tried. First I have added new customer: successfully. Then I tried to add a NEW domain. New customer appears in the list of domain holders. Then I went to an existing domain and tried to move it to new customer: New customer does NOT appear in the dropdown list of possible domain holders??!!

OK - strange. Very strange. Then I modified froxlor database manually and changed customer id in domain. Now the domains appear in customers froxlor panel - fine. But if I call them in admin frroxlor panel they are still displayed as owned by old customer - strange again. I have not seen where froxlor gets this information - it cannot be out of the panel_domains table. It seems so that the function for transferring domains to another customer are not working as expected...

Link to comment
Share on other sites

  • 0
10 minutes ago, df8oe said:

Then I went to an existing domain and tried to move it to new customer: New customer does NOT appear in the dropdown list of possible domain holders??!!

Possible if not allowed or too few resources etc.

11 minutes ago, df8oe said:

Then I modified froxlor database manually and changed customer id in domain.

Well ... Don't manually change things in the database....

 

12 minutes ago, df8oe said:

I have not seen where froxlor gets this information - it cannot be out of the panel_domains table. It seems so that the function for transferring domains to another customer are not working as expected...

Aha...it's definitely panel_domains but sorry, when playing around in the database any kind of support is pretty hard.

Just reproduced this on our demo ... Works just fine.

Link to comment
Share on other sites

  • 0

I have already reverted manually changings in froxlor database. Resources of customer are all set to infintely...

I think it will be much easier to delete the domains and subdomains and add them at the right customer later.

Link to comment
Share on other sites

  • 0

Done.

But I have choosen another way:

- changing customer ids in froxlors database tables mail_users, mail_virtual, panel_databases and panel_domains

- aligning informations in panel customers (number of databases, email, subdomains e.g.)

- changing paths (replacing old customer name in paths by new one)

- changing names of databases

- moving mail folders to new position (no changing of owners and permissions neccessary)

- moving webfolders to new position (ownership of files must be aligned to new owner)

- aligning static paths in webcontent to new one (one bash line using 'sed')

- aligning paths (e.g. for attachments) that are stored in CMS and forums databases of customer

 

That all took 15 minutes. At last I changed one setting in froxlor domain panel so that froxlor initiates cron job - and after cron run everything was transferred to new customer. All pages are working, all old emails are swapped, everything is working as expected. I think it is possible to do all this by php instead of by hand - but I do not know if the function is important.

 

Disclaimer: if you follow this way please make a backup before changing anything. I cannot guarantee if it works under all circumstances - for me it is doing the job.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...