Restore from backup.zip
11-08-2015, 05:43 AM
(This post was last modified: 11-08-2015, 06:17 AM by pinguy.)
If you followed my guides for Ubuntu and CentOS you will have noticed I recommend backing up to a zip for easy transfer.
If you need to re-setup a server/VPS with Sentora, and re-install your backup this is how you do it.
To start with make a FTP user (once sentora is installed) with access to the Master home directory.
This should be:
Next thing to do is upload the backup.zip to the master home (you should see the public_html folder).
Once it is uploaded we need to extract it.
You do this by running:
Once that is finished we need to set the correct permissions. At the moment it will be set to root:root.
We do this by running:
Once this is done all the files and directory's will be set with the correct file permissions and user.
As some sites need full read write to folders you will need to change the permissions to the folders as needed.
For Wordpress and MyBB theses are the permissions that need changing:
(obviously this is just an example, edit the locations as needed)
Most site software will give you a warning about permissions if they are not correct. If not, check with their site to set the correct permissions.
If you need to re-setup a server/VPS with Sentora, and re-install your backup this is how you do it.
To start with make a FTP user (once sentora is installed) with access to the Master home directory.
This should be:
Code:
/var/sentora/hostdata/zadmin/
Next thing to do is upload the backup.zip to the master home (you should see the public_html folder).
Once it is uploaded we need to extract it.
You do this by running:
Code:
unzip /var/sentora/hostdata/zadmin/backup.zip -d /var/sentora/hostdata/zadmin/
Once that is finished we need to set the correct permissions. At the moment it will be set to root:root.
We do this by running:
Code:
cd /var/sentora/hostdata/zadmin/public_html/
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
find . -type d -exec chown www-data:www-data {} \;
find . -type f -exec chown www-data:www-data {} \;
Once this is done all the files and directory's will be set with the correct file permissions and user.
As some sites need full read write to folders you will need to change the permissions to the folders as needed.
For Wordpress and MyBB theses are the permissions that need changing:
(obviously this is just an example, edit the locations as needed)
Code:
chmod 777 /var/sentora/hostdata/zadmin/public_html/MyBB/inc/config.php
chmod 777 /var/sentora/hostdata/zadmin/public_html/MyBB/inc/settings.php
chmod 777 /var/sentora/hostdata/zadmin/public_html/MyBB/uploads
chmod 777 /var/sentora/hostdata/zadmin/public_html/MyBB/uploads/avatars
chmod 777 /var/sentora/hostdata/zadmin/public_html/MyBB/inc/languages
chmod 777 /var/sentora/hostdata/zadmin/public_html/MyBB/admin/backups
chmod 777 /var/sentora/hostdata/zadmin/public_html/MyBB/cache
chmod 777 /var/sentora/hostdata/zadmin/public_html/MyBB/cache/themes
chmod -R 777 /var/sentora/hostdata/zadmin/public_html/Wordpress/wp-content
Most site software will give you a warning about permissions if they are not correct. If not, check with their site to set the correct permissions.