Current time: 04-18-2014, 07:29 PM Hello There, Guest! (LoginRegister)

Post Reply 
How do i backup my website?
05-25-2005, 01:57 PM
Post: #1
How do i backup my website?
I need to backup my whole website to my computer. I understand DH keeps a snapshot, but i need a full backup. I can alway copy and paste from my FTP but that sends the server load up high for acouple hours and prob messes up other users on the same server. Im on a shared server and had problems in the past with my account causing server load problems. Is there anyway i can get my website sent to me by dreamhost.. through email or something in .rar file?

thanks

GottaDeal.com Deals & Coupon Codes. Why Pay Retail?
Find all posts by this user
Quote this message in a reply
05-25-2005, 03:31 PM
Post: #2
How do i backup my website?
Try this.

1. Make this file on your home computer, called crontab2.sh

Quote:#!/bin/bash
suffix=$(date +%y_%m_%d)
gzip - r domain.com > $suffix-site_backup.gz
Replacing domain.com with your site name. This will create files in the base dir with names like 2005_05_01-site_backup.gz. (Note this script will make complete backups of your entire site. Change domain.com to certain folders).
This uses the -r switch which filters through all your folders. You could also use -1 to make it faster if it's too slow/resource hungry.
2. Make this file on your home computer too called crontab.txt

Quote:0 1 * * */3 `bash /home/username/crontab2.sh`
(You might/should be able to use "0 1 * * */3 `bash ~/crontab2.sh`" instead).
This will backup your site every 3 days at 01:00. I'd suggest you do it at a quiet time for your site as it would probably take a while to do.
3. Login to FTP and upload these files to the base dir (ie not in the domain.com folder)
4. Login to SSH and type

Quote:crontab crontab.txt
(you can use "crontab -l" to make sure it's added it properly).
Visit this user's website Find all posts by this user
Quote this message in a reply
05-25-2005, 03:40 PM
Post: #3
How do i backup my website?
Possible wiki topic: using rsync and cygwin to keep a local copy of your site. Bonus points if you can explain in cut'n'paste fashion how to get an ssh key to work to automate login :-)
Find all posts by this user
Quote this message in a reply
05-26-2005, 07:55 AM
Post: #4
How do i backup my website?
I use wget to mirrior my sites on the FTP level. Mostly cause I don't allow shell access for all the websites I'm keeping backups of and I need a single tool to do it all.

Down side with wget is that it doesn't recongnize . files nor does it do any time stamp checking (like rsync does--but rsync requires an active shell account).
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: