How to transfer Code, Images etc to new Domain?

Discussion in 'Site & Server Administration' started by michael_angeloh, Nov 19, 2005.

  1. #1
    A domain I've owned for a few years now will be expiring at the end of this year. I bought the package which included the File Manager Studio as well as the domain registration from Yahoo! originally. I own a new more prosperous domain name now also hosted on the Yahoo!server.

    My question is; I have some 200+ pages html coded and over 5,000 image files which I want to transfer from the old domain to my new domain. Having to transload each file would take weeks of time to do. Is there a more efficient way for me to bulk transfer or transload this many files so I can rename them with my new domain name.?

    Any suggestions or referrance links would be greatly appreciated...
     
    michael_angeloh, Nov 19, 2005 IP
  2. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #2
    Why not just download and upload them? Are you on dial-up or something?

    If you have SSH access, you could tar them up and then just untar them on the new server.
     
    fsmedia, Nov 19, 2005 IP
  3. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    In case you aren't aware, you can use a normal ftp client with yahoo servers, you don't need to use their web file manager. Like the other suggestion, download them all, then upload them all to the new server.
     
    woodside, Nov 19, 2005 IP
  4. michael_angeloh

    michael_angeloh Peon

    Messages:
    169
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    [Not sure what SSH is..?]

    Right... I've used their FTP client when transloading the files but have not tried using it for transporting so many image files yet. Sooo.... when I transfer the 200+ pages from the old domain they use the old domain url name in their individual image file names. Once those files are transferred to the new domain and the old domain name expires all the "old file image names" written in html code on my 200+ pages will need to be re-named in order to load..?
     
    michael_angeloh, Nov 19, 2005 IP
  5. cyclinder

    cyclinder Peon

    Messages:
    29
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    start by changing urls from _absolute_ to _relative_ ones :)
     
    cyclinder, Nov 25, 2005 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    Zip the whole site on your computer, upload it, unzip, and bang, site's all up!!!

    unzip whatever.zip

    on SSH.
     
    Nintendo, Nov 25, 2005 IP
  7. michael_angeloh

    michael_angeloh Peon

    Messages:
    169
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #7
    To clarify... this is a URL that has over 200+ site pages with thousands of image files in the html codes of each page. If either one of your suggestions can somehow convert the mage file names to the new URL that would save me a ton of effort so...

    Nintendo,
    use a Zip as in a zip file..?
    and uploading it will convert the image file names..?

    Cyclinder,
    how does one change the url's as you suggested..?
     
    michael_angeloh, Nov 25, 2005 IP
  8. Dekker

    Dekker Peon

    Messages:
    4,185
    Likes Received:
    287
    Best Answers:
    0
    Trophy Points:
    0
    #8
    absolute = http://site.com/forum/index.php

    relative = /forum/index.php
     
    Dekker, Nov 25, 2005 IP
  9. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #9
    Zip file, and they'll be the same on the new location.

    er what's the size of every thing combined and what's your internet speed?? If for example your'e on dial-up and you got, oh...30 megs of images.....Oh boy!!!!!
     
    Nintendo, Nov 25, 2005 IP
  10. michael_angeloh

    michael_angeloh Peon

    Messages:
    169
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanks for the response Cylinder...

    Nintendo,

    When you say "they'll be the same on the new location" you mean same as old url or new url..?

    Total size around 100 megs but I do have cable broadband and it is lightning fast compared to dial-up. Don't know much about zip files but my girlfriends got em so I'll be doing some research this weekend.
    I appreciate your expertiese my friend...
     
    michael_angeloh, Nov 25, 2005 IP
  11. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #11
    The file locations will be the same, if you do it right.

    domain.com/image/image101.gif

    will be

    otherdomain.com/image/image101.gif

    If the HTML code has the full URL in the codes, you can use a program to mass search and replace the old domain to the new one.

    When I upload a complete site I always do the zip trick. zip, upload the file, unzip and it's done.

    I think on Windows it's called WinZip. Then for unziping you have to have SSH access and go to the directoy with the file and then unzip correctly. Correctly as in being loged in as the right user. On the server I use, log in as root and then unzip and you're toast when it comes to updating the files on ftp!!!! Test a few files first to make sure they unzip in the right location with the correct access permission, user and not root for example.
     
    Nintendo, Nov 26, 2005 IP
    michael_angeloh likes this.
  12. michael_angeloh

    michael_angeloh Peon

    Messages:
    169
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Thanks so much Nintendo,

    If it works... I'll be most appreciative. My url reg is up at the end of the year so I have to start doing these transfers soon. I'll post here when and how it turns out...

    Thanks again my friend....
     
    michael_angeloh, Nov 27, 2005 IP
  13. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #13
    Of course first test it out with say 10 files ziped, so you don't upload the whole site...wrong, and the links are right!!!!!!!

    A few times I've uploaded a site and unziped it while loged in as the wrong user (root instead of site admin) and then I couldn't upload files to update them!! I had to delete the file once to update it again!!!
     
    Nintendo, Nov 28, 2005 IP
  14. Dekker

    Dekker Peon

    Messages:
    4,185
    Likes Received:
    287
    Best Answers:
    0
    Trophy Points:
    0
    #14
    did you cry?
     
    Dekker, Nov 28, 2005 IP
  15. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #15
    Wackos don't cry!!!! :D
     
    Nintendo, Nov 28, 2005 IP
  16. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Just a little note regarding rewriting your urls, the stream editor "sed" is basicly meant for doing these kind of bulk search and replaces on lots of files.

    This is a short introduction, there are proberly more elegant sollutions as I am by no means a sed guru :) sed is availible for dos too, but the following assumes a bash shell:

    Lets say you have a file1.html containing:

    http://host1.example.com
    http://host1.example.com/myurl/index.html

    if you then run "sed -e 's/host1/host2/g' file1.html"

    The result will look like this:

    http://host2.example.com
    http://host2.example.com/myurl/index.html

    This could be automated for a lot of files like this:

    make a temp dir:

    mkdir tmp

    for i in *.html; do sed -e 's/host1/host2/g' $i > tmp/$i ; done

    You will now have a copy of all your html files in the tmp directory, but with host1 changed to host2. For recursively doing that on all files in a directory, I would use find and xargs.

    You should ofcause change the above fit your needs and remember - relative paths are good :)
     
    blinxdk, Nov 28, 2005 IP
  17. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #17

    Next time as root: chown user:group yourdirectory/ -R
     
    blinxdk, Nov 28, 2005 IP