Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71
Original Poster
Rep:
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 ) ?
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.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
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.
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.
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.