userdata_update question
Question about the /usr/local/cpanel/bin/userdata_update script.
I have a large number of users migrated from another cPanel server that have customizations to /var/cpanel/userdata//. I want to remove the customizations as they're old and obsolete.
I don't want to nuke everything in /var/cpanel/userdata/ so userdata_update --rebuild is overkill. It appears from the code that if I delete the user data file (/var/cpanel/userdata//) and run /usr/local/cpanel/bin/userdata_update with no flags, the /var/cpanel/userdata// file will be recreated and no other user files will be changed.
Is this correct -- and safe? Any caveats?
Thanks in advance for any insight.
-
Hey there! I believe "--rebuild" in your post was a typo as the flag is "--reset" so I just wanted to point that out to avoid confusion. # /usr/local/cpanel/bin/userdata_update --help Usage: userdata_update [--reset] [--unpark_addons] [--help | --usage] Options: -------------------------------- --reset IMPORTANT! Do not conserve existing userdata and regenerate new userdata files based upon the current Apache configuration file. This should be used as a last resort. --unpark-addons Fix instances where an addon domain is also listed as a parked domain. This flag will result in a reset of all userdata files. See "--reset" warnings for more information. --help Display usage information
Yes, if you remove the /var/cpanel/userdata/username directory, running userdata_update with no flags will recreate that. Rather than remove it, it would be safer to copy that to another location, such as /root, so you can manually restore the old version if necessary.0 -
Hey there! I believe "--rebuild" in your post was a typo as the flag is "--reset" so I just wanted to point that out to avoid confusion.
[QUOTE] Yes, if you remove the /var/cpanel/userdata/username directory, running userdata_update with no flags will recreate that.
Yep, meant --reset. ;) I backed up the entire userdata directory. I don't plan to remove the entire directory. Just a selection of domains in /var/cpanel/userdata//. Just wanted to make sure there were not 'gotchas' running userdata_update with no flags since the documentation is pretty sparse. Many thanks!0 -
You're welcome! 0
Please sign in to leave a comment.
Comments
3 comments