![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Choice is an Illusion
Industry Role:
Join Date: Feb 2005
Location: Land of Obama
Posts: 42,635
|
![]() 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. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Doin fine
Industry Role:
Join Date: Oct 2005
Posts: 24,983
|
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Industry Role:
Join Date: Oct 2002
Location: Punta Cana, DR
Posts: 29,589
|
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 .... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
|
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 | |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Mar 2007
Location: Phoenix, Arizona
Posts: 1,725
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Choice is an Illusion
Industry Role:
Join Date: Feb 2005
Location: Land of Obama
Posts: 42,635
|
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). ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
|
Quote:
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 | |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Choice is an Illusion
Industry Role:
Join Date: Feb 2005
Location: Land of Obama
Posts: 42,635
|
Quote:
![]() ![]() ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
|
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 | |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
|
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 | |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
|
who said I never contribute
![]()
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho | |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
|
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
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho | |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
|
bump for people who can use some simple but handy shell scripts
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho | |
![]() |
![]() ![]() ![]() ![]() ![]() |