linux gurus, please give me syntax fro transfering files between 2 hosts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klinton
    So Fucking Banned
    • Apr 2003
    • 8766

    #1

    linux gurus, please give me syntax fro transfering files between 2 hosts

    ok, I need to move my domain to another host....
    and of course transfer ALL files and subdirectories from that one domain to my new host... (of course transfer them saving the same directory and subdirectories structure- I don't wanna have any 404s when I finally move my dns' to new host)..
    I have a SSH access to my NEW host...
    so, what is the command to transfer all files and subdirectories from that old host to new one (to, let's say home/klinton )...
    replies much appreciated
  • masta flash
    So Fucking Banned
    • Aug 2003
    • 530

    #2
    fxp it

    Comment

    • dougeetx
      Confirmed User
      • Apr 2002
      • 6163

      #3
      What control panel are you using on both hosts? You could have a problem if you're going from say Cpanel to Ensim or to Plesk. If you're using a straight redhat box on both, I can tell you the syntax.
      Coming Soon! A NEW revolution in black adult social networking!

      Comment

      • klinton
        So Fucking Banned
        • Apr 2003
        • 8766

        #4
        panel on new host is cpanel, on the old host- plesk afair.
        system on the new host- Redhat.

        Comment

        • Jizar II
          Confirmed User
          • May 2001
          • 1425

          #5
          transfer the tar
          scp /home/klinton/oldstuff.tar [email protected]:/home/klinton/oldstuff.tar

          Comment

          • klinton
            So Fucking Banned
            • Apr 2003
            • 8766

            #6
            Originally posted by Jizar II
            transfer the tar
            scp /home/klinton/oldstuff.tar [email protected]:/home/klinton/oldstuff.tar
            and when I untar this tar all files will have the same directory structure ?

            Comment

            • Madball
              Confirmed User
              • May 2002
              • 748

              #7
              Yes.
              <a href="http://www.homepageofthedead.com"><img src="http://board.gofuckyourself.com/images/globill_88x31.gif"></a>

              Comment

              • bagel
                Confirmed User
                • Aug 2002
                • 267

                #8
                have your host move everything for you ?
                Last edited by bagel; 03-12-2004, 08:35 AM.
                Alek
                150GB for $49 or 500GB for $99

                ICQ 161151471
                TEL 866.ASK.OXEO x 902
                TEL 212.812.9073 x 902

                Comment

                • raymor
                  Confirmed User
                  • Oct 2002
                  • 3745

                  #9
                  You can either login to the new server via SSH/telnet and
                  retrieve the files from the old, ro you can login to the old server
                  and send them to the new:


                  To send the files from this server to the other:
                  tar --gzip --preserve --same-owner --atime-preserve -cvf - |
                  ssh user@host "cd /; tar --ungzip --preserve --same-owner --atime-preserve -xvf -

                  or:

                  To get the files and bring them to this server:
                  ssh -l root 209.100.120.162 "cd /home2/goldstatsn/accs; tar --gzip --preserve
                  --same-owner --atime-preserve -cvf - ." |
                  tar --ungzip --preserve
                  --same-owner --atime-preserve -xvf -

                  That will copy the files. You'll need to set up the domains
                  in the config files o control panel also.
                  Webmin is the least painful control panel to use for this.

                  You will then have paths to adjust in .htaccess files, cgi scripts, and php scripts.
                  If you have ppassword files, message boards, databases,
                  or other dynamically updated info, you have to do some wierd
                  manipulations of the DNS so that you don't have people going
                  to both servers for a couple of days due to DNS caching.
                  For historical display only. This information is not current:
                  support&#64;bettercgi.com ICQ 7208627
                  Strongbox - The next generation in site security
                  Throttlebox - The next generation in bandwidth control
                  Clonebox - Backup and disaster recovery on steroids

                  Comment

                  • FrankWhite
                    Confirmed User
                    • Nov 2002
                    • 3540

                    #10
                    you can also use ttcp


                    ttcp -r -p 30666 | tar xvpf - -C dirname (on the receiving side, which means attach to port 30666 and
                    pipe all output to tar, also had to create the destination directory)

                    tar -cf - -C dirname . | ttcp -t -p 30666 ip

                    (this is on the sender side - means tar up the dir and pipe to ttcp, then ttcp is told to connect to port 30666 and...

                    Comment

                    • icedemon
                      Confirmed User
                      • Jun 2003
                      • 1022

                      #11
                      I use rsync. There is probably a couple of hundred ways to move the files over.
                      http://samba.anu.edu.au/rsync/examples.html
                      Clips4Sale.com

                      Comment

                      • EZRhino
                        Confirmed User
                        • Jul 2003
                        • 6258

                        #12
                        Originally posted by raymor
                        You can either login to the new server via SSH/telnet and
                        retrieve the files from the old, ro you can login to the old server
                        and send them to the new:


                        To send the files from this server to the other:
                        tar --gzip --preserve --same-owner --atime-preserve -cvf - |
                        ssh user@host "cd /; tar --ungzip --preserve --same-owner --atime-preserve -xvf -

                        or:

                        To get the files and bring them to this server:
                        ssh -l root 209.100.120.162 "cd /home2/goldstatsn/accs; tar --gzip --preserve
                        --same-owner --atime-preserve -cvf - ." |
                        tar --ungzip --preserve
                        --same-owner --atime-preserve -xvf -

                        That will copy the files. You'll need to set up the domains
                        in the config files o control panel also.
                        Webmin is the least painful control panel to use for this.

                        You will then have paths to adjust in .htaccess files, cgi scripts, and php scripts.
                        If you have ppassword files, message boards, databases,
                        or other dynamically updated info, you have to do some wierd
                        manipulations of the DNS so that you don't have people going
                        to both servers for a couple of days due to DNS caching.
                        Good advise, your host should have a tech available to help you out.

                        Comment

                        • TheJimmy
                          ICQ- five seven 0 2 5 5 0
                          • Jan 2001
                          • 10747

                          #13
                          the last time I did this I used lftp across two bsd boxes....had my tech guy give me the syntax and bamm, was working like a charm...gotta have lftp installed on both sides, however I'm sure there are several ways to do this...

                          definitely get a tech guy to walk you through it, or hire someone to do it for ya...


                          personally I like to learn and take notes once a month on new schtuff like that...
                          Investor with 5m - 15m USD to invest. Do you have a site or network of sites earning 50k - 200k a month income? Email your contact and preliminary data to: domain.cashventures (at) gmail.com....Please...no tire kickers...serious offers and inquiries only.

                          Comment

                          Working...