How to delete a domain without deleting it's file ?

I presume you mean the home directory and all the contents.

Check man userdel; search for the -remove command option for information.

Jeff
 
Thanks.
I have enable CloudFlare.
Now, my question is,
How to white list all CloudFlare's IP?
What file on the server should I edit ?

Thanks !
I presume you mean the home directory and all the contents.

Check man userdel; search for the -remove command option for information.

Jeff
 
Yes, this will remove the entire user, but will not mark it as removed in DirectAdmin.

To remove a domain without removing the files you probably need to be a bit creative, depending on which files.

Warning the following is untested and may delete things you don't want deleted; be sure to back up the user first.

Only the files in /home/username/domains/example.com? then run this code:
Code:
# chattr -R +i /home/username/domains/example.com
Then remove the domain from inside DirectAdmin, and then run this to make the files writable/deletable again:
Code:
chattr -R -i /home/username/domains/example.com
Note this WILL NOT save many domain settings, but should save all the files except the databases; you should save them yourself first.

TEST FIRST. I'M NOT RESPONSIBLE IF YOU LOSE YOUR DATA. I'M ONLY RESPONSIBLE IF I DO THE WORK FOR YOU UNDER CONTRACT.

Jeff
 
Back
Top