LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-28-2008, 09:30 AM   #1
markb658
Member
 
Registered: Mar 2005
Distribution: Ubuntu 7.10
Posts: 69

Rep: Reputation: 15
Ways to backup web server?


Hi, I have a web server on my network here, and its always on hosting a few sites, about 5, and a few user accounts for file storage etc. For backups i used to just copy the files onto my dekstop machine and make backups that way, but the more the server is growing the more of a pain its beginning to get! I just put another linux box on my network, just a clean fresh install of ubuntu server, So i was wondering is there any scripts or programs where i could backup the home directory/MySql databses/apache config/the apache www folder (any other important things im missing?) onto the new server i put in, basically make this just a backup server? Is this possible?

I found this using google any use for what im looking for?
http://linux.about.com/od/backup_rec...wtbar12t02.htm

That link looks promising enough, onlt thing is say i do a backup using this, and my server fails completely, i re-install ubuntu fresh, and do a restore, would the server be back the way it was before? or would the new install cause problems?

Cheers
-Mark

Last edited by markb658; 02-28-2008 at 09:36 AM.
 
Old 02-28-2008, 10:26 AM   #2
weisso5
Member
 
Registered: Oct 2007
Location: New York City
Distribution: Gentoo, FC
Posts: 133

Rep: Reputation: 16
I love to read about diligent backer-uppers. Yes there are a few programs you can use to accomplish this. Depending on your level of comfort, i will outline a few options for you.


1. Rsync, Webmin, AutomysqlBackup:
II. You can use Rsync to copy files to destination automatically
III. You can use Webmin to backup all your configuration files
IV. you can use AutoMySQLBackup to automatically make daily, monthly, and weekly copies of your SQL databases, this is a very simple script, which i can provide to you.

2. Incremental Backups using a more complex Sceme:
II. Follow this great How To using Rsync:


3. Bacula:
II. Tons of information, config examples and How To's can be found here: http://wiki.bacula.org/doku.php

4. Dirvish:
II. http://wiki.dirvish.org/

5. Rsnapshot, based on rsync:
II.http://www.rsnapshot.org/howto/

6. SSH+Tar scripts:
II. In this method the contents of the backup travel (compressed) across the network, but through ssh. You can choose to backup any part (or all) of a filesystem. This is also useful if you have run out of space on a machine that needs backing up - this method doesn't require an intermediate tar file to be stored on the harddrive.
III. More complicated method, but i can provide assistance


These are just a few of your options, please let me know if you need anymore info

-weisso

Last edited by weisso5; 02-28-2008 at 10:27 AM.
 
Old 02-28-2008, 07:13 PM   #3
bigdawggi
LQ Newbie
 
Registered: Feb 2008
Location: Delta, OH -- USA
Distribution: Redhat, Fedora Core
Posts: 2

Rep: Reputation: 0
Expect Scripts

If you're into scripting (or want to become so) I just found the benefits of a program called "Expect" -- It comes with Redhat/Fedora Core...not sure about ubuntu -- In an evening you can have it backing up files automatically to your backup server using FTP (or any other method you want).

Check out "#man expect" and see what you can find out. There's also "#man autoexpect" which will generate a script by 'watching' your session.

I just created a script and put it into crontab so it runs daily.

Here's a couple good sites expalining Expect with small examples too:
http://www.linuxjournal.com/article/3065
http://linux.die.net/man/1/expect (just the man page...but helpful still)

Good luck!
bigdawggi
 
Old 02-29-2008, 05:44 AM   #4
t0bias
Member
 
Registered: Aug 2005
Distribution: Fedora 13, RHEL 5.3, Ubuntu 10.04, Debian Lenny
Posts: 128

Rep: Reputation: 16
a less "complicated" way without scripting could be bacula:
http://www.bacula.org
 
Old 03-10-2008, 10:09 AM   #5
the1sephiroth
Member
 
Registered: Oct 2005
Location: east coast
Distribution: Ubuntu
Posts: 131

Rep: Reputation: 15
Quote:
IV. you can use AutoMySQLBackup to automatically make daily, monthly, and weekly copies of your SQL databases, this is a very simple script, which i can provide to you.
I really would be interested in this. I don't know too much about mysql, but my intranet runs off of it, so I know that backups are definitely needed in this case.
 
Old 03-10-2008, 12:28 PM   #6
weisso5
Member
 
Registered: Oct 2007
Location: New York City
Distribution: Gentoo, FC
Posts: 133

Rep: Reputation: 16
Sure it's a great little script, takes about 2mins to setup.

Here is a link:
http://sourceforge.net/projects/automysqlbackup/


-weisso
 
Old 03-10-2008, 01:46 PM   #7
the1sephiroth
Member
 
Registered: Oct 2005
Location: east coast
Distribution: Ubuntu
Posts: 131

Rep: Reputation: 15
Cool thanks. Since it's not a very active community, me being the only poster, would weekly backups be sufficient?
 
Old 03-12-2008, 01:27 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That's down to you... how much of pain would it be to re-enter a week's worth of data? (assuming you can remember it all...)
 
Old 03-12-2008, 11:32 AM   #9
weisso5
Member
 
Registered: Oct 2007
Location: New York City
Distribution: Gentoo, FC
Posts: 133

Rep: Reputation: 16
i agree with chrism01, i do daily, weekly, and monthly backups. The backups are not going to be that large, mine are about 40megs, and you can never EVER have too many backups.


-weisso
 
Old 03-12-2008, 11:36 PM   #10
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Rep: Reputation: 30
Hey all,
For backups, I found this works for my purposes.
All servers are mounted via NFS to my backup server.
I wrote a script for each server (generic except for different directories listed). the script simply tar zips locally on the backup server the contents of all directories from all the networked servers I listed.
I do this every night, and keep 2 days backup / month / year. Excessive I know, but as you see, never have too many backups.

If there is a failure in the backup, check $? after running tar, I get an email that the back up failed, and I can check it quickly. But now I still have yesterdays backup.

Josh

My favorite is when people start backing up their data, after they lost it all. Smart.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
remote backup of th web server keyF Linux - Software 3 03-26-2007 07:55 PM
Web server backup and failover panicbox Linux - Networking 4 08-29-2006 01:56 AM
LXer: Backup MySQL databases, web server files to a FTP server automatically LXer Syndicated Linux News 0 08-11-2006 09:54 PM
Backup exclusions for RedHat 7.3 Web server? Tenover Linux - General 7 01-31-2006 10:29 PM
Possible ways to backup laptop drigz Linux - Software 5 10-15-2004 11:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration