using a tar.gz file for site transfer?

using a tar.gz file for site transfer?

Posted by: rla
Posted on: 2007-02-27 12:01:00

Hi all

I have a .tar.gz archive file that I created on my old webhost before it went down. I need to upload it now to dreamhost.com from my new account - but it's unclear to me how to do that and make the file expand, etc, to restore my old site. Does anyone have experience with this?

Thanks in advance,

Jay

Re: using a tar.gz file for site transfer?

Posted by: rlparker
Posted on: 2007-02-27 12:57:00

The way you do this is to upload that tar.gz tarball up to your user space then log in to the shell via ssh and expand the file using the *nix tar command. I'm assuming you know how to ftp, as you have gotten this far, so I won't address that further. wink

Read the Dreamhost Wiki Article of the shell, paying special attention to the included links to "enabling shell access", to make sure that your user is authorized to access the shell.

Once you have connected to the shell, and can see your newly uploaded *.tar.gz file, you can "extract/expand" that file into you space with the "tar" command.

For more details on the use of tar, just type "man tar" and the tar user manual pages will be displayed.

Once your tarball is expanded, you may have to move some directories around, or rename some directories, depending upon the structure of your site on the other host, in order to have the files in the right place on DH ' structure.

--rlparker

Re: using a tar.gz file for site transfer?

Posted by: khatfield
Posted on: 2007-02-28 01:15:00

Should be able to just:
ssh in and:
gzip -d backupexample.tar.gz
tar -xvf backupexample.tar


Save

Re: using a tar.gz file for site transfer?

Posted by: anonymous2
Posted on: 2007-02-28 01:18:00

In reply to:

gzip -d backupexample.tar.gz
tar -xvf backupexample.tar


Or just: tar xvzf backupexample.tar.gz

Re: using a tar.gz file for site transfer?

Posted by: mao
Posted on: 2007-02-28 01:22:00

And just to show that I know something about it,
I'd tell you next time to use
bzip2 instead of .gz, because bzip compress better.
so :

compress:
tar cvyf file.tar.bz2 directory

extract
tar xvyf file.tar.bz2

The difference is y instead of z

Cupons:MAO_HALFPRICE : pay only half of the price (L1 plans only) MAO97 get 97$ back

Re: using a tar.gz file for site transfer?

Posted by: anonymous2
Posted on: 2007-02-28 01:45:00

I tried it, but got:

$ tar cvyf file.tar.bz2 *
tar: Warning: the -y option is not supported; perhaps you meant -j?


Yeah, so j instead of y.

Thanks for that suggestion though. Supposedly there is a large trade-off between file size and cpu time. So, bz2 could run into the process killer more...

And if you want "silent" tarring, leave out the 'v'. laugh

What would pain me using bz2, I can see now, would be the extra keystrokes from using bzless file.bz2 instead of zless file.gz, which is already *so* much longer than less file. wink

Re: using a tar.gz file for site transfer?

Posted by: mao
Posted on: 2007-02-28 02:45:00

:)

btw..change your signature.. 9999 doesn't work anymore :)

Cupons:MAO_HALFPRICE : pay only half of the price (L1 plans only) MAO97 get 97$ back

Re: using a tar.gz file for site transfer?

Posted by: lando
Posted on: 2007-02-28 13:56:00

I have the same problem as rla, but I'm confused about "the shell" and that help article didn't help either. Where is "the shell"? How do I use "the shell"?



Re: using a tar.gz file for site transfer?

Posted by: mao
Posted on: 2007-02-28 14:56:00

Ok. You are speaking about the shell as something mystical (uuh "the shell")..wich in fact is. :)
A shell is a place where you can write command to be executed. If you are running windows, a shell is like a command prompt. (Start/All Programs/Accessories/Command Prompt). On a shell you can see your files with the command "ls" (short for "list"), you can change directory with the command "cd" (short for "change directory) ..etc..

To use the shell you need to activate it first. Panel->Users->Manage Users->and select Edit. You will see the possibilty to activate the shell. After that you should wait for an email with some more explanation.

That email doesn't explain everything, so I'll tell you what you should do.
First you need a program to access shell easily and in a comfortable way.Windows gives you a way to do that but it's not good enough. Almost everyone likes to use PuTTY.
(http://www.chiark.greenend.org.uk/~sgtatham/putty/)
Download that program and start it. It will open a window; for now just put your hostname where it says "Hostname".
If you press Open, you should see a new window appear with something kind of code on it, asking if you accept the crypted connection. Say yes.
A black window will appear then, asking for your username, write it (you should have it written on the email ) and press enter. Then it will ask for the password. Write it and press enter.
Now you are on a shell.
I usually suggest here to write "csh" and press enter.
then try with:
ls
ls -l
cd yourhostname.com
ls -l
ls -a
cd
explanation: ls -l means ls long, where you can see more information about your files.
cd yourhostname.com (where yourhostname.com) will change the directory you are seeing. later when you write cd alone, the shell will go back to the starting directory.
ls -a shows hidden files (files starting with a dot.) This is useful done inside your domain's directory because you will see .htaccess files (if created).

I hope this is clear enough. feel free to ask again. Don't worry about feeling dumb. I usually ask dumber question.

Cupons:MAO_HALFPRICE : pay only half of the price (L1 plans only) MAO97 get 97$ back

Re: using a tar.gz file for site transfer?

Posted by: anonymous2
Posted on: 2007-03-01 01:55:00

> 9999 doesn't work anymore :)

What makes you say that? Last I heard it works sometimes.

Re: using a tar.gz file for site transfer?

Posted by: anonymous2
Posted on: 2007-03-01 01:58:00

> Ok. You are speaking about the shell as something mystical (uuh "the shell")..wich in fact is. :)

It surrounds the kernel, after all. :-)

Isn't your post's explanation in the links from the wiki link above? If not, could you update the wiki? cool

Re: using a tar.gz file for site transfer?

Posted by: mao
Posted on: 2007-03-01 03:51:00

the shell page explain what a shell is in a "wikipedia" style wich could be difficult to understand.

I'll probably add my text surrounded by something like:

"mao, on our forum tried to explain what a shell is with this post:" ...and then I'll copy my post there.

What do you think?
(I'll link my name to my site, just to have a href to my site :-)

Cupons:MAO_HALFPRICE : pay only half of the price (L1 plans only) MAO97 get 97$ back

Re: using a tar.gz file for site transfer?

Posted by: mao
Posted on: 2007-03-01 03:53:00

sometimes?

Well I tried it when I purchased my hosting plan (23rd of feb)
and it didn't worked.


Cupons:MAO_HALFPRICE : pay only half of the price (L1 plans only) MAO97 get 97$ back

Re: using a tar.gz file for site transfer?

Posted by: anonymous2
Posted on: 2007-03-01 04:13:00

> (I'll link my name to my site, just to have a href to my site :-)

I think the powers that be won't allow that, unless they don't notice. cool

> sometimes?

It's a real Special Sale! by dreamhost. Sometimes it works, sometimes it doesn't. Unless they turned it off completely, without telling me.

Re: using a tar.gz file for site transfer?

Posted by: mao
Posted on: 2007-03-01 06:11:00

OH. then I should have tried for the whole week instead of registering just before the big shutdown..
:)

Cupons:MAO_HALFPRICE : pay only half of the price (L1 plans only) MAO97 get 97$ back

Re: using a tar.gz file for site transfer?

Posted by: rla
Posted on: 2007-03-05 20:14:00

I'm in the putty shell and have tried extracting the tar using "tar -xf mybackupname.tar.gz" but get the following:

[mrpibb]$ tar -xf mybackupfile.tar.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Read 7006 bytes from mybackupfile.tar.gz
tar: Error exit delayed from previous errors

now I'll be realllly pissed if the file they sent me was corrupt - but is there any other explanation? how do I verify?

When I ran the command one user suggested in a post above, it went through a lengthy process of showing me all of the directories within my archive, but I'm not sure if it expanded it or anything, because it appears that no files were created.

Re: using a tar.gz file for site transfer?

Posted by: rla
Posted on: 2007-03-05 20:33:00

Yes, I used tar xzvf xname.tar.gz

It listed all of my directories (i believe) and when it stopped, it seemed it had worked - but no extracted files or directories have appeared.

When I use the tar -t command to "list" all of the files, it just seems to halt my progress in the shell indefinitely. i lose the {mrpibb} header/prompt (whatever it's called!)

And of course, I receive this if I run tar -xf alone. Is that not normal?:

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Read 7006 bytes from xname.tar.gz
tar: Error exit delayed from previous errors

Re: using a tar.gz file for site transfer?

Posted by: Atropos7
Posted on: 2007-03-05 20:42:00

In reply to:

now I'll be realllly pissed if the file they sent me was corrupt - but is there any other explanation? how do I verify?


"This does not look like a tar archive"

Well don't be pissed - just be ashamed that you didn't realize the file is a compressed file, hence the .gz extension. When you uncompress it, *then* you have a tar file.

And yeah it should have been tar -xzf mybackupfile.tar.gz - the z causes tar to use gzip to uncompress the file first.

cool Atropos | openvein.org

Re: using a tar.gz file for site transfer?

Posted by: rla
Posted on: 2007-03-06 23:37:00

lol - ok that makes sense... now if only that corrected command would work!

Re: using a tar.gz file for site transfer?

Posted by: wholly
Posted on: 2007-03-07 06:45:00

Don't forget to use a "nice" before that command to try to convince the process killer not to kill your extract.

You may even want to do it in two parts, uncompress an then tar.

Wholly - Use promo code WhollyMindless for full 97$ credit. Let me know if you want something else!

Re: using a tar.gz file for site transfer?

Posted by: mao
Posted on: 2007-03-07 13:15:00

yeah. be nice..
next time:

please Linux, tar -xzf file.tar.gz

if you are nice, it shoud work

Bonk!
sorry... :)

Cupons:MAO_HALFPRICE : pay only half of the price (L1 plans only) MAO97 get 97$ back

Re: using a tar.gz file for site transfer?

Posted by: rlparker
Posted on: 2007-03-07 13:38:00

HA HA HA! that's niiiice!! I liiiiiiike! smile

--rlparker

Tags: tar gzgz filedreamhostwebhostthanks in advance