Solved

Debian Linux Apache2

Posted on 2012-03-11
6
404 Views
Last Modified: 2012-03-25
I tarred up the Sites-enabled and Sites-available directories and to move this to a new debian server.  How can I untar them to the existing  directory?  When I decompress they make a second directory under these.  

Also, will moving these directories be enough to move the web app from apache?  

Or could I use like rsync to make an exact replica of the server?

Thanks in advance!

Jackson
0
Comment
Question by:Jack_son_
  • 3
  • 3
6 Comments
 
LVL 31

Expert Comment

by:farzanj
ID: 37707222
It really depends upon how you have created your tar.  If you have included sub folders, they would be created if you untar it.

The important thing was to preserve permissions and perhaps the full paths as well.

Did you tar with permissions like
tar pcvf  tarfile.tar folder_to_be_tarred

First check your archive

tar tvf tar_filename.tar

This will show you what tarred.  If you untar, you will get all the folders that are contained in your archive.  Sort of answer your question?
0
 

Author Comment

by:Jack_son_
ID: 37707351
i use just pcv, but I could re-tar it.  When i untar it on the new folder it makes a directory under the sites-available called sitesavailable and then the sites are in there.  

How can I untar or move these websites to the sites-available directory?

Or how can i move these sites to the other directory?

Also, is it possible to just tar the entire apache2 directory and replace the one on the new server with this one?

Thanks for your help,

Jackson
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37707506
If I understand you correctly, all you need to is to move everything one directory level above

 mv maindir ..
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:Jack_son_
ID: 37707581
yes
0
 

Author Comment

by:Jack_son_
ID: 37710994
i actually got it tarred up but when i decompress it, it returns an error.  the file size is about 1 gb
0
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 37711223
Are you just untarring it or uncompressing as well?  A simple tar archive is not compressed, just an archived file.

Did you try
tar tvf tarfile.tar
?

Is it just tar or tar.gz (tgz)? tar.bz2?

If you cannot see the contents, then it might be corrupted.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now