Changes

From SME Server
Jump to navigationJump to search
32 bytes removed ,  10:59, 21 April 2021
m
Line 1: Line 1:  
{{usefulnote}}
 
{{usefulnote}}
== Backup server configuration ==
+
==Backup the server configuration==
    
===Overview===
 
===Overview===
   −
{{Warning box|This is a non standard method of transferring data between servers and should be carefully used to ensure that no data is lost or altered during the process. If wrong or inappropriate copying procedures are used, your data may have incorrect permissions applied. Using tar and scp is the "best" way to transfer files directly between servers while retaining correct permissions/ownership in the process.}}
+
{{Warning box|This is a non-standard method of transferring data between servers and should be used carefully to ensure that no data is lost or altered during the process. If wrong or inappropriate copying procedures are used, your data may have incorrect permissions applied. Using tar and scp is the "best" way to transfer files directly between servers while retaining correct permissions/ownership in the process.}}
      Line 32: Line 32:       −
<ol></li><li>On the server to be backed up (server1) do
+
<ol><li>On the server to be backed up (server1) do
 
  mkdir -p /temp
 
  mkdir -p /temp
mv /home/e-smith/files/users /temp
+
mv /home/e-smith/files/users /temp
mv /home/e-smith/files/ibays /temp
+
mv /home/e-smith/files/ibays /temp
mv /home/e-smith/files/xxxx /temp
+
mv /home/e-smith/files/xxxx /temp
    
</li><li>Perform backup to desktop on server1 using the standard server manager panel
 
</li><li>Perform backup to desktop on server1 using the standard server manager panel
Line 42: Line 42:  
</li><li>Then on server1 do
 
</li><li>Then on server1 do
 
  mv /temp/users /home/e-smith/files/
 
  mv /temp/users /home/e-smith/files/
mv /temp/ibays /home/e-smith/files/
+
mv /temp/ibays /home/e-smith/files/
mv /temp/xxxx /home/e-smith/files/
+
mv /temp/xxxx /home/e-smith/files/
    
</li><li>Build another server to restore to (server2), and perform a fresh install of sme server on it. Note that any preferred hardware can be used, it does not need to be physically identical to the original server the backup was performed on.
 
</li><li>Build another server to restore to (server2), and perform a fresh install of sme server on it. Note that any preferred hardware can be used, it does not need to be physically identical to the original server the backup was performed on.
Line 64: Line 64:  
Modify the following commands appropriately to only move the data you require.
 
Modify the following commands appropriately to only move the data you require.
   −
<ol></li><li>Use tar to compress all the user and ibays folders (on server1) by doing
+
<ol><li>Use tar to compress all the user and ibays folders (on server1) by doing
 
  cd /home/e-smith/files
 
  cd /home/e-smith/files
tar -czvf /temp/users.tar.gz users
+
tar -czvf /temp/users.tar.gz users
tar -czvf /temp/ibays.tar.gz ibays
+
tar -czvf /temp/ibays.tar.gz ibays
tar -czvf /temp/xxxx.tar.gz xxxx
+
tar -czvf /temp/xxxx.tar.gz xxxx
    
</li><li>Use scp to copy the tarred files between machines by doing (on server1)
 
</li><li>Use scp to copy the tarred files between machines by doing (on server1)
Line 77: Line 77:     
If ssh is configured for a different port (than 22) use
 
If ssh is configured for a different port (than 22) use
  scp -P zzzz /temp/users.tar.gz server2IP:/home/e-smith/files/
+
   
 +
scp -P zzzz /temp/users.tar.gz server2IP:/home/e-smith/files/
 
  scp -P zzzz /temp/ibays.tar.gz server2IP:/home/e-smith/files/
 
  scp -P zzzz /temp/ibays.tar.gz server2IP:/home/e-smith/files/
 
  scp -P zzzz /temp/xxxx.tar.gz server2IP:/home/e-smith/files/
 
  scp -P zzzz /temp/xxxx.tar.gz server2IP:/home/e-smith/files/
Line 85: Line 86:  
</li><li>Use tar to uncompress all the user and ibay folders by doing (on server2)
 
</li><li>Use tar to uncompress all the user and ibay folders by doing (on server2)
 
  cd /home/e-smith/files/
 
  cd /home/e-smith/files/
tar -xvzf users.tar.gz
+
tar -xvzf users.tar.gz
tar -xvzf ibays.tar.gz
+
tar -xvzf ibays.tar.gz
tar -xvzf xxxx.tar.gz
+
tar -xvzf xxxx.tar.gz
rm /home/e-smith/files/users.tar.gz
+
rm /home/e-smith/files/users.tar.gz
rm /home/e-smith/files/ibays.tar.gz
+
rm /home/e-smith/files/ibays.tar.gz
rm /home/e-smith/files/xxxx.tar.gz
+
rm /home/e-smith/files/xxxx.tar.gz
 
   
If required, to correct ownership for each user on server2 do
 
If required, to correct ownership for each user on server2 do
   
  cd /home/e-smith/files/users
 
  cd /home/e-smith/files/users
chown -R username:username username
+
chown -R username:username username
 
</li></ol>
 
</li></ol>
   Line 208: Line 207:  
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! SME 9 !! SME 8.2 !! SME 7.5.1
+
!SME 9!!SME 8.2!!SME 7.5.1
 
|-
 
|-
|  
+
|
 
  home/e-smith
 
  home/e-smith
 
  etc/e-smith/templates-custom
 
  etc/e-smith/templates-custom
Line 223: Line 222:  
  etc/samba/secrets.tdb
 
  etc/samba/secrets.tdb
 
  etc/samba/smbpasswd  
 
  etc/samba/smbpasswd  
||  
+
||
 
  home/e-smith
 
  home/e-smith
 
  etc/e-smith/templates-custom
 
  etc/e-smith/templates-custom
Line 236: Line 235:  
  etc/samba/secrets.tdb
 
  etc/samba/secrets.tdb
 
  etc/samba/smbpasswd  
 
  etc/samba/smbpasswd  
||  
+
||
 
  home/e-smith
 
  home/e-smith
 
  etc/e-smith/templates-custom
 
  etc/e-smith/templates-custom

Navigation menu