Easiest Way 2 Transfer???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Barefootsies
    Choice is an Illusion
    • Feb 2005
    • 42635

    #1

    Easiest Way 2 Transfer???

    I am in the middle of some redesigns of some membership paysites. Thousands of pictures, and videos. I am adding in new CMS as I get to each new site when completed.

    My question is I want to move hosts, and I obviously do not want to spend 6 months reuploading everything to the new site, and script. So...

    What's the easiest way to move all of the stuff?

    Put it on a 2nd HD, and put on the server, and then cut n paste to move them all and get it done that way (I've done it like that once before. A pain, but faster than uploading)?

    Have copies of the sites moved to a new host, and then do as mentioned above, then delete it once I have everything in a new CMS/website?

    Anyone had to do this before? What did you do? Webhosts with recommendations???

    Thanks in advance.

    Should You Email Your Members?

    Link1 | Link2 | Link3

    Enough Said.

    "Would you rather live like a king for a year or like a prince forever?"
  • stickyfingerz
    Doin fine
    • Oct 2005
    • 24984

    #2
    Talk to your host they can probably do the transfer. We were looking at having to do the same thing but just ended up using the host that the sites were on. Pretty happy with them.

    Comment

    • directfiesta
      Too lazy to set a custom title
      • Oct 2002
      • 30200

      #3
      rsync if you have shell on both ....

      100 gigs should take about a day.
      I know that Asspimple is stoopid ... As he says, it is a FACT !

      But I can't figure out how he can breathe or type , at the same time ....

      Comment

      • ServerGenius
        Confirmed User
        • Feb 2002
        • 9377

        #4
        Here's a shell script to do the transfer of ssh with rsync. If you need help
        with it hit me up.

        Code:
        #!/bin/bash
        #
        # Hans Waasdorp : [email protected]
        #
        # rsync transfer script
        # script can also run from cron to sync content over multiple servers
        # it only updates files that have been changed since the last run, will
        # preserve permissions and ownership. It will remove files that are no
        # no longer available on the source server. 
        
        
        
        source /root/.bashrc
        
        # Path we want to transfer
        SOURCE="/www/"
        
        # Path where we want to store the transfer
        DESTINATION="[email protected]:/www/"
        
        # Debug for verbose transfer stats 
        DEBUG=0
        
        # Testrun if set to 1 it will do a dry run without transferring anything
        TESTRUN=0
        
        LOCKFILE="/tmp/rsynch.lock"
        
        # any stuff you don't want to transfer
        EXCLUDEPATTERNS="--exclude=*.log"
        
        if [ "x$DEBUG" == "x1" ]; then
                OPTIONS="--stats --progress"
        fi
        if [ "x$TESTRUN" == "x1" ]; then
                OPTIONS="-n --stats --progress"
        fi
        
        if [ ! -f $LOCKFILE ]; then
        
                touch $LOCKFILE
                trap 'rm -f ${LOCKFILE} >/dev/null 2>&1' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
                rsync -e "ssh -i /root/.ssh/id_dsa" -u -aH $EXCLUDEPATTERNS --delete --force --partial $OPTIONS $SOURCE $DESTINATION
        else
                exit 1
        fi
        | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

        Comment

        • Way3
          Confirmed User
          • Mar 2007
          • 1727

          #5
          Originally posted by directfiesta
          rsync if you have shell on both ....

          100 gigs should take about a day.
          In most cases, rsync wiil be your best option! Best of Luck!

          FULLY Managed! FREE Control Panel! FREE Month on ALL Shared Accounts!!!
          ICQ: 169-554-261
          Email: info[at]way3{dot}com

          Comment

          • Barefootsies
            Choice is an Illusion
            • Feb 2005
            • 42635

            #6
            Thanks gents. Bookmarked.

            Well I have been happy with my main host for the better part of a decade. But with my billing changes over the past couple of years, and more competitive pricing I am looking at moving my hosting on almost all sites.

            Since I am trying to get all of my sites redesigned, adding in CMS, and some extra spice, I figured now is a good time to look into moving everything as well. Obviously the amount of time to move all this on ONE site, much less half a dozen would be extremely time consuming. So I do not want to have to spend months doing that, or hiring people.

            The main issue is that with the new scripts, I will not be able to just transfer over, and tada it is up and working. I would have to get new script installed on new host. Then move/post/catagorize old stuff into the new format, and once it's complete, end old hosting.

            I know when I did this on my celebrity site a few years back it took a good 3-4 months to get 5000+ celebs, 100's of thousands of pictures, all their movies, and shit into the new script (considering the time available for such a task).

            Should You Email Your Members?

            Link1 | Link2 | Link3

            Enough Said.

            "Would you rather live like a king for a year or like a prince forever?"

            Comment

            • ServerGenius
              Confirmed User
              • Feb 2002
              • 9377

              #7
              Originally posted by Barefootsies
              Thanks gents. Bookmarked.

              Well I have been happy with my main host for the better part of a decade. But with my billing changes over the past couple of years, and more competitive pricing I am looking at moving my hosting on almost all sites.

              Since I am trying to get all of my sites redesigned, adding in CMS, and some extra spice, I figured now is a good time to look into moving everything as well. Obviously the amount of time to move all this on ONE site, much less half a dozen would be extremely time consuming. So I do not want to have to spend months doing that, or hiring people.

              The main issue is that with the new scripts, I will not be able to just transfer over, and tada it is up and working. I would have to get new script installed on new host. Then move/post/catagorize old stuff into the new format, and once it's complete, end old hosting.

              I know when I did this on my celebrity site a few years back it took a good 3-4 months to get 5000+ celebs, 100's of thousands of pictures, all their movies, and shit into the new script (considering the time available for such a task).

              doesn't have to be hard at all, first setup the webserver with vhost containers then use the rsync script for the content. I can get you
              a script for mysql databases as well. Most scripts will just work if you don't
              change the structure...except if they have have static ips defined somewhere
              but that's easy to fix.

              | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

              Comment

              • Barefootsies
                Choice is an Illusion
                • Feb 2005
                • 42635

                #8
                Originally posted by ServerGenius
                doesn't have to be hard at all, first setup the webserver with vhost containers then use the rsync script for the content. I can get you
                a script for mysql databases as well. Most scripts will just work if you don't
                change the structure...except if they have have static ips defined somewhere
                but that's easy to fix.

                Awesome.
                Should You Email Your Members?

                Link1 | Link2 | Link3

                Enough Said.

                "Would you rather live like a king for a year or like a prince forever?"

                Comment

                • ServerGenius
                  Confirmed User
                  • Feb 2002
                  • 9377

                  #9
                  Quick and easy mysql backup script

                  Code:
                  #!/bin/bash
                  
                  #
                  # Mysql Backup Script
                  # Hans Waasdorp [email protected]
                  #
                  
                  TODAY=`/bin/date +%d-%m-%y`
                  
                  BACKUP_MYSQL=1
                  
                  DEST_DIR="/path/to/backup/dir"
                  
                  DESTINATION_DIR="$DEST_DIR/$TODAY"
                  KEEP_DAYS=7
                  
                  # edit below PASSWD="password" and USER="username" to your mysql username and password 
                  
                  if [ $BACKUP_MYSQL -eq 1 ]; then
                    PASSWD="password"
                    USER="username"
                    DATABASES=`mysql -BN -u $USER --password=$PASSWD -e 'SHOW DATABASES;'`
                  
                    if [ -x /usr/bin/mysqldump ]; then
                      for db in $DATABASES; do
                        mkdir -p $DESTINATION_DIR
                        cd $DESTINATION_DIR
                        /usr/bin/mysqldump --opt -u $USER --password=$PASSWD $db | gzip - | cat - > mysql.$db.dump.gz
                      done
                    fi
                  fi
                  
                  /usr/bin/find $DEST_DIR/ -type d -mtime +$KEEP_DAYS | xargs rm -rf 2>&1 > /dev/null
                  | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

                  Comment

                  • ServerGenius
                    Confirmed User
                    • Feb 2002
                    • 9377

                    #10
                    Fuck it if you have a debian linux box you can use this for creating the apache
                    vhost container from a shell command. If you have other linux quite easy to
                    adapt so that it will work.

                    Code:
                    #!/bin/sh
                    
                    # --(( Apache VirtualHost Configuration Tool v1.0 ))--
                    #
                    # Hans Waasdorp [email protected]
                    #
                    # Vhost is a very simple shell script to easily add virtual hosts to an 
                    # Apache webserver. It prompts for a domain name and root directory,   
                    # appends a virtual host entry to httpd.conf, and restarts Apache. 
                    
                    # variables - edit these to fit your environment
                    
                    CONF=/etc/apache2/vhost.conf    # location of Apache conf file
                    [email protected]             # email appended to server errors,etc.
                    INDEX1=index.html               # default index file
                    INDEX2=index.php                # alternate index file
                    PID=/var/run/apache2.pid        # location of httpd.pid
                    
                    # Don't edit anything below
                    
                    SERVER="$1"
                    DOCROOT="$2"
                    USER="$3"
                    IP="$4"
                    
                    if [ ! "$*" ]
                    then
                    echo
                    echo " --(( Apache VirtualHost Configuration Tool v1.0 ))--"
                    echo
                    echo "      Usage: vhost [domain] [webroot] [username] [ipaddress]" 
                    echo
                    echo "      domain = yourdomain.com (leave out www)" 
                    echo "      webroot = path to website directory, i.e. /home/username/www/yourdomain.com"
                    echo "      username = your username"
                    echo "      ipaddress = ipaddress to use for vhost"
                    echo
                    exit 1
                    fi
                    
                    if [ -e "$CONF" ]
                            then
                                    cp $CONF $CONF.bak
                            else
                                    echo "No changes made - vhost.conf file not found!"
                                    exit 1
                    fi
                    
                    echo "
                    <VirtualHost $IP>
                        ServerAdmin $EMAIL
                        ServerName $SERVER 
                        ServerAlias www.$SERVER
                        DocumentRoot $DOCROOT 
                        DirectoryIndex $INDEX1 $INDEX2 
                            ErrorLog /var/log/apache2/vhosts/$SERVER.error.log
                            CustomLog /var/log/apache2/vhosts/$SERVER.access.log combined
                       <Directory />
                          Options -Indexes +FollowSymLinks
                          AllowOverride None
                          Order allow,deny
                          allow from all
                       </Directory>
                       <Directory $DOCROOT>
                          Options All -Indexes +FollowSymLinks +MultiViews
                          AllowOverride All
                          Order allow,deny
                          allow from all
                       </Directory>
                    </VirtualHost>
                    " >> $CONF
                    
                    mkdir -p $DOCROOT
                    chown -R $USER:$USER $DOCROOT
                    
                    if [ -e "$PID" ]
                            then
                                    kill -HUP `cat $PID`
                                    echo
                                    echo "- added VirtualHost to vhost.conf"
                                    echo "- old vhost.conf renamed to vhost.conf.bak"
                                    echo "- restarted Apache"
                                    echo
                                    exit 0
                            else
                                    echo "Couldn't restart Apache - apache2.pid not found!"
                                    exit 1
                    fi
                    | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

                    Comment

                    • ServerGenius
                      Confirmed User
                      • Feb 2002
                      • 9377

                      #11
                      who said I never contribute
                      | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

                      Comment

                      • ServerGenius
                        Confirmed User
                        • Feb 2002
                        • 9377

                        #12
                        Apache vhost tool once again.....i forgot to build in a check before creating
                        the new vhost docroot.

                        Code:
                        #!/bin/sh
                        
                        # --(( Apache VirtualHost Configuration Tool v1.0 ))--
                        #
                        # Hans Waasdorp [email protected]
                        #
                        # Vhost is a very simple shell script to easily add virtual hosts to an 
                        # Apache webserver. It prompts for a domain name and root directory,   
                        # appends a virtual host entry to httpd.conf, and restarts Apache. 
                        
                        # variables - edit these to fit your environment
                        
                        CONF=/etc/apache2/vhost.conf    # location of Apache conf file
                        [email protected]             # email appended to server errors,etc.
                        INDEX1=index.html               # default index file
                        INDEX2=index.php                # alternate index file
                        PID=/var/run/apache2.pid        # location of httpd.pid
                        
                        # Don't edit anything below
                        
                        SERVER="$1"
                        DOCROOT="$2"
                        USER="$3"
                        IP="$4"
                        
                        if [ ! "$*" ]
                        then
                        echo
                        echo " --(( Apache VirtualHost Configuration Tool v1.0 ))--"
                        echo
                        echo "      Usage: vhost [domain] [webroot] [username] [ipaddress]" 
                        echo
                        echo "      domain = yourdomain.com (leave out www)" 
                        echo "      webroot = path to website directory, i.e. /home/username/www/yourdomain.com"
                        echo "      username = your username"
                        echo "      ipaddress = ipaddress to use for vhost"
                        echo
                        exit 1
                        fi
                        
                        if [ -e "$CONF" ]
                                then
                                        cp $CONF $CONF.bak
                                else
                                        echo "No changes made - vhost.conf file not found!"
                                        exit 1
                        fi
                        
                        echo "
                        <VirtualHost $IP>
                            ServerAdmin $EMAIL
                            ServerName $SERVER 
                            ServerAlias www.$SERVER
                            DocumentRoot $DOCROOT 
                            DirectoryIndex $INDEX1 $INDEX2 
                                ErrorLog /var/log/apache2/vhosts/$SERVER.error.log
                                CustomLog /var/log/apache2/vhosts/$SERVER.access.log combined
                           <Directory />
                              Options -Indexes +FollowSymLinks
                              AllowOverride None
                              Order allow,deny
                              allow from all
                           </Directory>
                           <Directory $DOCROOT>
                              Options All -Indexes +FollowSymLinks +MultiViews
                              AllowOverride All
                              Order allow,deny
                              allow from all
                           </Directory>
                        </VirtualHost>
                        " >> $CONF
                        
                        
                        if [ ! -d "$DOCROOT" ]
                                then
                                        echo "Creating vhost docroot"
                                        mkdir -p $DOCROOT
                                        chown -R $USER:$USER $DOCROOT
                                else
                                        exit 1
                        fi
                        
                        if [ -e "$PID" ]
                                then
                                        kill -HUP `cat $PID`
                                        echo
                                        echo "- added VirtualHost to vhost.conf"
                                        echo "- old vhost.conf renamed to vhost.conf.bak"
                                        echo "- restarted Apache"
                                        echo
                                        exit 0
                                else
                                        echo "Couldn't restart Apache - apache2.pid not found!"
                                        exit 1
                        fi
                        Last edited by ServerGenius; 07-16-2007, 06:40 AM.
                        | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

                        Comment

                        • ServerGenius
                          Confirmed User
                          • Feb 2002
                          • 9377

                          #13
                          bump for people who can use some simple but handy shell scripts
                          | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

                          Comment

                          Working...