Solved

Debian Linux Apache2

Posted on 2012-03-11
6
408 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

813 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

15 Experts available now in Live!

Get 1:1 Help Now