Addon domain folder suddenly emptied ?

Wagnard

Registered
May 27, 2022
4
0
1
Canada
cPanel Access Level
Root Administrator
Hi,
Something weird happened to me a few weeks ago and it did happen +- a year ago too.
I have 1 user on my cPanel / WHM and this user have 3 addons domains.
For whatever reason, all of the addon subdomains folder get emptied.
Note: The addons domain are not deleted, it's just their folders that get emptied.
No issues for the main domain.
I have to restore the files from a backup and I'm ok for another year or so.

Has anyone encountered this in the past and also and most importantly, how do I prevent this ?

Thanks you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,743
1,866
363
cPanel Access Level
Root Administrator
Hey there! That's definitely odd behavior, and not something I'd expect to happen with any automated server processes. I'm actually not even sure where to start looking for information about this since it only happens once a year, so waiting for it to happen again isn't realistic.

Do you see anything in /usr/local/cpanel/logs/access_log related to the affected directory? It may also be worth checking /var/log/messages to see if there were any FTP connections made that would have affected that directory.
 

Wagnard

Registered
May 27, 2022
4
0
1
Canada
cPanel Access Level
Root Administrator
I finally found out what is causing this.
The folder get emptied when I do a restore of the account.
I can confirm the files are in the backup so why would my addon subdomains folder get emptied on backup restauration of my account ???
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,743
1,866
363
cPanel Access Level
Root Administrator
I would expect a restore to remove files that weren't present in the backup - what if you were restoring because of a compromise and those files need to be overwritten? The whole site will return to the state it was when the backup was created.