LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2016, 08:12 PM   #1
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,055

Rep: Reputation: 78
will unzipping a tar archive break directory mapped to mounted storage device?


I am trying to migrate a website from one server to another. The old website (on CentOS) has a directory that is mapped to a mounted storage device:
Code:
$ sudo df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/xvda1     165138796 13891952 142858296   9% /
tmpfs            4013932        0   4013932   0% /dev/shm
/dev/xvdb1      77273156   221340  73119912   1% /var/www/private-folder/block-storage
I've set up the new server (Ubuntu) with its own mounted storage device mapped to the same directory location in the file system:
Code:
$ sudo df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev             4074892      12   4074880   1% /dev
tmpfs             817152     428    816724   1% /run
/dev/xvda1     165002356 4657300 153408576   3% /
none                   4       0         4   0% /sys/fs/cgroup
none                5120       0      5120   0% /run/lock
none             4085756       0   4085756   0% /run/shm
none              102400       0    102400   0% /run/user
/dev/xvdb       77278216  223944  73122112   1% /var/www/private-folder/block-storage
If I tar up the www folder on the old machine:
Code:
cd /var
sudo tar -cvzf www-backup.tgz www
and then extract that archive on the new machine:
Code:
cd /var
scp root@old.machine:/var/www-backup.tgz ./
sudo tar -xvzf www-backup.tgz
Will this screw up the mounted directory on the new server? Or will it just copy my old www contents onto the new server with the old block-storage contents written onto the new block-storage device?
 
Old 05-05-2016, 01:52 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,925

Rep: Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192
Quote:
Originally Posted by sneakyimp View Post
Or will it just copy my old www contents onto the new server with the old block-storage contents written onto the new block-storage device?
Yes.
 
1 members found this post helpful.
Old 05-11-2016, 07:08 PM   #3
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,055

Original Poster
Rep: Reputation: 78
Thank you for the reply. It gave me sufficient confidence to attempt a deployment and it worked as you said.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar archive - How is a single directory extracted without the parent directories? Siopa Linux - Software 12 01-22-2014 03:49 AM
Network device Memory mapped or Port mapped ?? Bignon Linux - Hardware 0 10-20-2009 08:36 AM
USB storage device does not get mounted. toxic_brain Linux - Hardware 9 02-29-2008 11:54 PM
(un)tar a certain directory from an archive Suinatsa Linux - Software 2 06-20-2006 07:09 AM
tar - extracting a single directory from a large archive? lowpro2k3 Linux - General 1 07-24-2005 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration