LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-04-2008, 11:49 AM   #1
geek_man
Member
 
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Rep: Reputation: 15
Backup


Hi!

I need to make incremental backups of the files in a file server. I have read that I can do it with the command tar.

Have you ever used this?
How do you make incremental backups?

Thanks.
 
Old 01-04-2008, 11:55 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Have you tried at all to google for "incremental backups tar". First link has a tutorial about it. It will also give you hints about other backup methods which will be far more detailed than any few lines post somebody can put here.
 
Old 01-04-2008, 12:03 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I'd suggest using a combination of rsync and tar/gzip. If you know anything about shell scripting, should only take a few minutes to whip up some script to do this for you.
 
Old 01-04-2008, 12:48 PM   #4
geek_man
Member
 
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Original Poster
Rep: Reputation: 15
Backup

Hi!

Thanks for the answers.

Mega Man X: I hadn't read that tutorial, now I have. Thanks for the hint. I want to know if someone has used this method (tar), so I can read experiences with this technique and some suggestions.

trickykid: I am going to look for information about this combination(rsync / tar). Do you have experiences using it? Is it the easiest solution for simple backups ( I mean for a file server that hosts some shared files from about 10 computers ) ?

Thanks.
 
Old 01-04-2008, 03:46 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by geek_man View Post
Hi!

Thanks for the answers.

Mega Man X: I hadn't read that tutorial, now I have. Thanks for the hint. I want to know if someone has used this method (tar), so I can read experiences with this technique and some suggestions.

trickykid: I am going to look for information about this combination(rsync / tar). Do you have experiences using it? Is it the easiest solution for simple backups ( I mean for a file server that hosts some shared files from about 10 computers ) ?

Thanks.
I use my own rsync scripts to do some backups on my personal servers. If you're dealing with 10 computers you want to backup, you may want to look into something like bacula or amanda. If it's just 10 computers that connect to one file server and you only want to backup that file server, then a simple rsync/tar script would probably be just fine.

Here's a little script I made a long time ago to do a simple daily backup of specified directories to another local location for incremental backups:

Code:
#!/bin/bash

PATH=/bin:/usr/bin
BACKUPDIR=/home/backup/daily

cd $BACKUPDIR
OPTS=" --delete --exclude cache --exclude Cache"

TODAY=`date +%d%b%y`
YESTERDAYDIR=`/bin/ls -lrt | grep ^d | tail -1 | awk '{print $NF}'`

#echo $YESTERDAYDIR

if [ $YESTERDAYDIR != $TODAY ] 
then
  cp -al $YESTERDAYDIR $TODAY 
else
 echo Retrying Unfinished Backup
fi

rsync $OPTS -a /home/* /$BACKUPDIR/$TODAY
You could easily modify it to tar and gzip the final outcome to compress the data if you need to save space. Then I have another script to clean up after so many days, I keep like a 7 day backup of incrementals, not much changes on this system. Another script I have takes weekly full dumps using rsync to put onto a offsite server I have just in case this server goes bye bye. Maybe this will get you started on some ideas you can do.
 
Old 01-04-2008, 09:58 PM   #6
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Of course, if you want to, you can use Amanda to do all that. It has the option of using gnutar and gzip, can go to disk if you choose, and will recycle the backups after whatever interval you choose. It may be overkill for just one system, but after you've written a certain amount of scripting, you reach the point where you might as well have adopted it in the first place. I reached that point some time ago. Anyway, then you will have all the reporting options as well as the ability to easily expand to your other systems or to tape if you choose. And, as a bonus, you've learned another useful program.
 
Old 01-05-2008, 09:22 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I did actually mention bacula and amanda as a choice. If you know you're only going to have one server, I really don't see the need but if it's the 10 computers or possibly grow those, I would implement a solution instead of home brew scripts.
 
Old 01-07-2008, 05:25 PM   #8
geek_man
Member
 
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Original Poster
Rep: Reputation: 15
Backup

Hi!

Thanks for the answers.
I think I was not clear. I just have to backup the information in the file server.
I guess the script will be enough. I will modify it and when it is ready I will post it here.
By the way I will try Amanda, just to check the features and have it as an option in the future.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Using RSync to backup a secondary off-site backup server pezdspencer Linux - Software 4 06-29-2007 03:40 PM
Using rsync to backup data. Best way to backup folders? Micro420 Linux - General 2 11-23-2006 01:13 AM
Error when attempting backup with File Backup lglrgl Linux - Software 0 08-03-2006 10:38 AM
Selective backup to CDRW, or other backup methods. trekk Linux - Software 1 11-03-2003 02:46 PM
backup and update the backup file doris Linux - General 4 08-24-2002 07:26 PM

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

All times are GMT -5. The time now is 06:56 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