Can I Restore a Backup from VCP to a different user? Topic is solved

General questions about VestaCP
ohioiproject
Posts: 37
Joined: Tue Apr 18, 2017 10:54 pm

Can I Restore a Backup from VCP to a different user?

Postby ohioiproject » Thu Dec 07, 2017 10:08 pm

Subject asks it all. I know it's probably been answered a million times, but I couldn't find it. I'd prefer to do it via GUI, but if I have to CLI, I understand.

Backup from user Admin, to another user. System is ubuntu 16.04LTS x64

sysdop
Posts: 6
Joined: Fri Dec 08, 2017 1:46 am

Re: Can I Restore a Backup from VCP to a different user?

Postby sysdop » Fri Dec 08, 2017 1:59 am

ohioiproject wrote:Subject asks it all. I know it's probably been answered a million times, but I couldn't find it. I'd prefer to do it via GUI, but if I have to CLI, I understand.

Backup from user Admin, to another user. System is ubuntu 16.04LTS x64


@ohioiproject By ssh console you can access the user's directory and with a simple command move it or copy it to the other directory.

Practical example:

To copy go to the directory.

Code: Select all

cd /home/USER/web/WEBSITE/public_html


Then you throw a cp in the following way.

Code: Select all

cp -R * /home/NEW USER/web/NEW WEBSITE/public_html


It is possible that the directory you are trying to copy exists files, so I recommend verifying the existence of files either files that you have put or that are by default of the system, such as favicon.ico, index.html and robots.txt to delete them .

To move the files we would simply change cp to mv, example.

Code: Select all

mv * /home/NEW USER/web/NEW WEBSITE/public_html


Finally, in case the user changes or you have made a copy, you will assign the corresponding user and group to the files that you played in the following way.

Code: Select all

chown NEWUSER:NEWUSER -R /home/NEW USER/web/NEW WEBSITE/public_html


If you need professional help do not hesitate to write me privately or respond to the topic to answer your next questions.
Last edited by sysdop on Fri Dec 08, 2017 12:58 pm, edited 1 time in total.

ohioiproject
Posts: 37
Joined: Tue Apr 18, 2017 10:54 pm

Re: Can I Restore a Backup from VCP to a different user?

Postby ohioiproject » Fri Dec 08, 2017 9:51 am

sysdop wrote:snip


the only downside to this idea of yours is that it doesn't add the databases, emails, or anything else that is already propagated, and also won't work with how Vesta detects and forwards domains so the Vhosts files would never be built or would still be pointing to the Admin user.

ohioiproject
Posts: 37
Joined: Tue Apr 18, 2017 10:54 pm

Re: Can I Restore a Backup from VCP to a different user?  Topic is solved

Postby ohioiproject » Fri Dec 08, 2017 12:08 pm

Solved via this doc: https://vestacp.com/docs/#how-to-migrat ... her-server

If you want to restore data under another user name, simply rename archive. If user name doesn't exist on the server, account will be created automatically.

Code: Select all

mv /home/backup/admin.2014-01-14.tar /home/backup/newuser.2014-01-14.tar
v-restore-user newuser newuser.2014-01-14.tar


Return to “General Discussion”



Who is online

Users browsing this forum: No registered users and 6 guests