Page 1 of 1

Rebuild User script

Posted: Tue Jul 21, 2015 8:56 am
by madip
Hi,
what sort of operations does v-rebuild-user script?
It seems that it recreates and overwrites some stuffs configuration?
Is it safe in production environment?

thanks

Re: Rebuild User script

Posted: Tue Jul 21, 2015 10:39 am
by skurudo
madip wrote:what sort of operations does v-rebuild-user script?
It seems that it recreates and overwrites some stuffs configuration?
# info: rebuild system user
# The function rebuilds system user account.

and this command does rebuild -> /usr/local/vesta/func/rebuild.sh -> template, data files, permissions on logs, directory tree and other.
madip wrote:Is it safe in production environment?
For who? For admin? For user? ;-) If you made custom changes in user config apache/nginx and make rebuild, then you get standart config from template. It's safe? Hmm, safe. But if you have something else in mind, tell me.

Re: Rebuild User script

Posted: Tue Jul 21, 2015 10:31 pm
by madip
Thanks skurudo.
Maybe I was not clear. If i make a rebuild on a user(any user) that has a website in production, does rebuild remove all files and folder in virtualhost docroot? Does rebuild reset databases? Does rebuild reset all configurations for that website?
Can i do this action without break the site? I read the code and it seems it's not a good idea to make a rebuild when the site of an "user account" is in production.....
help me to understand.
thanks

Re: Rebuild User script

Posted: Wed Jul 22, 2015 6:24 am
by skurudo
madip wrote:Maybe I was not clear. If i make a rebuild on a user(any user) that has a website in production, does rebuild remove all files and folder in virtualhost docroot? Does rebuild reset databases? Does rebuild reset all configurations for that website?
Rebuild change only configuration files, not user data like user files or user database.
madip wrote:Can i do this action without break the site? I read the code and it seems it's not a good idea to make a rebuild when the site of an "user account" is in production.....
Yep, you do. There is one moment, if you make some modification in apache2.conf/nginx.conf for user, this will be changed.. break it your site? I don't know.

Re: Rebuild User script

Posted: Wed Jul 22, 2015 6:58 am
by madip
Perfect!
got it !

thanks

Re: Rebuild User script

Posted: Wed Jul 22, 2015 8:27 am
by skurudo
madip wrote:Perfect!
got it !
You're welcome ;-)

Re: Rebuild User script

Posted: Fri Jul 22, 2016 1:33 pm
by malinscky.ilya
skurudo wrote:
madip wrote:Maybe I was not clear. If i make a rebuild on a user(any user) that has a website in production, does rebuild remove all files and folder in virtualhost docroot? Does rebuild reset databases? Does rebuild reset all configurations for that website?
Rebuild change only configuration files, not user data like user files or user database.
madip wrote:Can i do this action without break the site? I read the code and it seems it's not a good idea to make a rebuild when the site of an "user account" is in production.....
Yep, you do. There is one moment, if you make some modification in apache2.conf/nginx.conf for user, this will be changed.. break it your site? I don't know.

Good job! Thank you very much:)

Re: Rebuild User script

Posted: Fri Sep 23, 2016 12:44 pm
by skurudo
First steps to make good docs for all of us, guys! ;-)

API documentation and examples:
http://vestacp.com/docs/API.pdf

CLI commands list and descriptions:
http://vestacp.com/docs/CLI.txt