PDA

View Full Version : Backing up



candle-licious.com
07-10-2003, 10:44 AM
What is the best way to back up my westhost site as well as all my miva data... is there a program I should use or just copy the files to a CD?
Not sure the best way any help would be great!

WestHost - CSimiskey
07-11-2003, 11:21 AM
There isn't a backup utility that I am aware of that does this, but I can make some recommendations for you to make sure you have all your information:

1. If feasible (if you have a large site and a 56K modem, this would NOT be feasible), just download everything from your /home/username directory on down. This means you get all of your Miva data as well as all of your html files, CGI scripts, etc. If not, from your /home/username directory, get the htsdata folder. Then go into your www directory and download all the .html files there. If you have images, get those, if you have subfolders, retrieve them as you feel is appropriate.

2. Keep local copies. Don't make changes to your website directly on your account. Make a local copy, edit it to your hearts content and then upload it. This means less you have to download from your site, because you already have it.

I'm sure others may have tips for you as well, but I think those will be a good start for you.

candle-licious.com
07-11-2003, 11:27 AM
Thank you Chris, we have DSL so I should be able to copy everything with out a problem

torrin
07-11-2003, 11:42 AM
If you're going to download the whole site, I'd suggest using zip (windows) or using tar and gzip (unix).

That way, at least it will be compressed before you transfer it.

jadie56
06-07-2006, 05:39 PM
Glad I found this thread. I have been trying to figure this out. My question is if I download the entire directory mentioned above and then delele it on my serever and then upload the entire directory back again will my web site be exactly the same as it was before? I know this is a dumb question but I can't help but ask it.

Will all my add-on apps be restored as well including my database files holding my phpBB member list and post history, my Gallery 2 pixs and member list as well as any customizatioin I have done such as the themes and css files?

And concerning editing my site off line should I download the enitre home directory, make my changes and then up load the entire directory?

I am using the WS_FTP program provided by Westhost, and it is working great btw, I have a very fast cable modem and a large offline hard drive. Is it necessary to compress the files before up or downloading or is time and storage space the only concern?


Thanks to all you people on here who help the near helpless like myself. With out this kinda of help and encouragement I would just be using my computer to play solitare.

wildjokerdesign
06-07-2006, 08:17 PM
There are some files and directories you will not need to download. Chris mentioned /home/username but I go the direct route to /var/www/html. /home/username is one directory up from that and holds both a lib and www directory. The www is just simply a symbolic link to /var/www/html.

Ok now when you are in that directory you will see a few things you really don't need to bother with downloading.

fm - Filemanager for SiteManager
manager - link to your SiteManager
plugins - Various things installed via SiteManager
vdsbackup - The backup directory
pma - phpMyAdmin

There may be others but those are the main ones that you might have that you do not need to download. Although phpBB is installed by SiteManager it sounds like you have made changes so you would want that. If you put the directory or file on the server then you want a copy of it. :) I don't upload entire directories but only files that I have changed. Saves time.

When I am makeing a full backup of the site I do normally simply zip up the /var/www/html directory via SSH but then once I download it to my local computer I normally get rid of the above mentioned directories.

I would not delete a directory and then upload it again. Too many things could go wrong with this. Especially since you are just starting out. ;) For one you are likely to get errors. You can't delete some of them since they are owned by Root (WestHost).

allyn
06-07-2006, 09:39 PM
just noticed this today. engadget report on how to backup a web site using ssh, rsync, etc.

http://www.engadget.com/2006/06/06/how-to-back-up-your-blog/

jadie56
06-08-2006, 11:07 AM
There are some files and directories you will not need to download. Chris mentioned /home/username but I go the direct route to /var/www/html. /home/username is one directory up from that and holds both a lib and www directory. The www is just simply a symbolic link to /var/www/html.
Ok I will use the to /var/www/html directory. I was using that one before.

Ok now when you are in that directory you will see a few things you really don't need to bother with downloading.

fm - Filemanager for SiteManager
manager - link to your SiteManager
plugins - Various things installed via SiteManager
vdsbackup - The backup directory
pma - phpMyAdmin

There may be others but those are the main ones that you might have that you do not need to download.
If I have the space I assume there is no problem in downloading all the files and it is just a capacity an time issue.

Although phpBB is installed by SiteManager it sounds like you have made changes so you would want that. If you put the directory or file on the server then you want a copy of it.
Will the /var/www/html directory backup my SQL and data files for my site and especially phpBB? Things like member lists, posts and images?

I don't upload entire directories but only files that I have changed. Saves time.

When I am makeing a full backup of the site I do normally simply zip up the /var/www/html directory via SSH but then once I download it to my local computer I normally get rid of the above mentioned directories.
I am not familiar with compressing files and after reading a little about the SSH I am pretty much afraid of that right now. What are the benefits of using SSH? I assume security and maybe speed? Does it make for a more automated restore process?

I would not delete a directory and then upload it again. Too many things could go wrong with this. Especially since you are just starting out. For one you are likely to get errors. You can't delete some of them since they are owned by Root (WestHost).
Thank you very much wildjoker you comments have been a big help. I took a look at your site and will be emailing you with a request for estimate. Thanks again ,

Jadie

wildjokerdesign
06-08-2006, 11:14 AM
The databases for phpBB are located in a different directory so no the process described so far will not back up your database.

You have two options. The first option is to install phpMyAdmin via your SiteManager and use it to back up the database. There are links in the program for how to do things. BTW - I think phpBB has a backup utility built into it's Admin section. Never used it so can't remember if it is part of the default or a mod I saw.

The second is to manually download the database files from the server. Not sure if we should go into that. :) It can be tricky and if you are not comfortable with SSH yet then we might want to leave that for latter.

wildjokerdesign
06-08-2006, 11:21 AM
I was right about phpBB haveing a Backup utility built in. Look under General Admin.

jadie56
06-08-2006, 11:31 AM
I already have phpmyadmin installed and looked it over, but haven't tackled it yet. I have used the phpBB back up as well, but I uess I am just a little parinoid. Owned computers since 1977 and have had my share of catastropic faliues, you know the kind that requires format C lol.

allyn
06-08-2006, 05:10 PM
i have a cron job that dumps my mysql database into an ascii file every night (see below). then i use rsync to make a backup of my entire vps every night to my linux box at home.

0 4 * * * /usr/bin/mysqldump --all-databases > /tmp/mysql.sql

wildjokerdesign
06-08-2006, 06:27 PM
allyn,
In your nightly back up are you just backing up /var/www/html or your entire account starting at /?

I would assume that if someone simply wanted to back up the phpBB database they could use the following where phpBB is replaced with the name of the database used for the forum:

0 4 * * * /usr/bin/mysqldump phpBB > /tmp/mysql.sql

Here is a link to the MySQL manual in regards to the use of "mysqldump".
http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html
Might be usefull to others in the future.

allyn
06-09-2006, 01:12 AM
i backup my entire vps starting at / . i think i had to find a compatible version of rsync from somewhere since i don't think it is part of the vps. i can't remember where i got mine. i used to have a redhat 9 box at home, it may have come from there. of course you could always build your own.

here's the command i run on my linux box at home:
rsync -av --delete --exclude /proc --exclude /etc/depend --exclude /var/www/html/fm --exclude /dev westhost:/ /data/web/backup/root/

there's some magic involved with ssh keys that don't need a password and a .ssh/config file to define "westhost" to my domain name and account name. but you could just as easily use user@domain and type your password too.

torrin
06-09-2006, 09:03 AM
i think i had to find a compatible version of rsync from somewhere since i don't think it is part of the vps.

FYI, rsync is very easy to get compiled on your VPS. See . . .
http://www.domsch.com/westhost/

Shameless Plug :) for the rsync howto on my website . . .
http://www.torrin.net/mediawiki/index.php/Rsync-HOWTO

lclark
06-26-2006, 04:27 AM
there is a backup utility in the file manager, i would assume that is okay to use. what is the difference of using that backup and using the meathod described in here?

thanks alot

wildjokerdesign
06-26-2006, 08:00 AM
Part of what is described here is backing up your MySQL databases. I don't belive the back up utility in Site Manager does that. Also some of the things described here are setting up automatic backups as in the case of Mysql and the cron job.

lclark
06-26-2006, 08:08 AM
ok, so to be sure my database is backed up properly i should do what is described above. i have not done that yet. i better. thanks for letting me know the utility does not do that.

rolling
09-21-2006, 10:21 AM
i backup my entire vps starting at / .

How often do you back up and what sort of bandwidth does that use up?

allyn
09-21-2006, 04:30 PM
How often do you back up and what sort of bandwidth does that use up?
every night and since rsync only copies files that change, the bandwith is almost nothing because my web site is pretty static.