Solved

Debian Linux Apache2

Posted on 2012-03-11
6
415 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
combine Mutt command with a select statement to distribute file in Linux 2 49
rsyslog raw message 4 37
Linux 3 34
Windows 10 linux VM 16 32
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…
Fine Tune your automatic Updates for Ubuntu / Debian
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

756 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