[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Debian Linux Apache2

Posted on 2012-03-11
6
Medium Priority
?
433 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 

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 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

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…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.
Suggested Courses

649 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