Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-20-2005, 01:27 AM   #1
LQ Newbie
Registered: Dec 2004
Posts: 27

Rep: Reputation: 15
Backup Solution

Right now I have a 20gb hard drive sitting around doing nothing. I decided that I would use this to back up my home directory. I was wondering if anyone knew a good way to do this. I want to have it back up anything to the 20gb that had been updated since the previous back up in the /home that was under 100mb. I was thinking like setting it up to do this at 4am or so if the computer is on.

Anyone know a good way or program to do this? or Will I have to write some crazy SH script? I am a java programer and have never written an sh script to do much more than download a few things with wget or compile some things.
Old 01-20-2005, 01:49 AM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
I use rsync to backup my folders and after the initial run, all other runs just update things so it's very quick. For that reason, I don't even bother using cron for that.

You need to put a partition on the second drive and format it as ext3 for example:
mkfs.ext3 /dev/hdb1

mkdir /mnt/images
mount /dev/hdb1 /mnt/images -t ext3

Put an entry in the /etc/fstab so it's available every time you boot.
/dev/hdb1 /mnt/images vfat defaults 0 0
To make it writable for users with a group id of 500, edit the /etc/fstab file to include the following line /dev/hdb1 /mnt/win vfat gid=500,umask=002 0 0

Run the rysnc job, I usually run it a couple of times to make sure everything went ok.

rsync -av --delete-after /home/fred /mnt/images
Old 01-20-2005, 02:18 AM   #3
Registered: Apr 2004
Distribution: Slackware 9.1/10.1, Mandrake 9.1/10.1
Posts: 75

Rep: Reputation: 15
Try this:

You can control the snapshot interval and how many snapshots to keep, it will rotate the snapshots for you, very handly.
Old 01-20-2005, 02:20 AM   #4
LQ Newbie
Registered: Dec 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Would there be anyway to exclude files over 100mb with rsync? there is an exclude PATTERN but what is a pattern>?

Last edited by Hexane; 01-20-2005 at 02:21 AM.
Old 01-20-2005, 09:41 AM   #5
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
You could create a list by using find or even putting the files into the list manually. May require some experimenting.
find /home/fred find -type f -name '*' -size +1000 -exec ls {} \; >list
rsync -av --exclude-from='list' /home/fred /mnt/images
Old 01-22-2005, 09:40 AM   #6
Registered: Sep 2004
Location: NJ
Distribution: Gentoo
Posts: 104

Rep: Reputation: 15
A backup application

Mondo - this is what i use (and many others) to backup my server. By using CRON i can create backup schedules.
Old 01-23-2005, 05:26 AM   #7
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
You might also want to check out DAR. I searched for 4 years for a backup solution to do what I wanted; I found it with DAR.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need the best backup solution dtournas Linux - Software 1 10-16-2004 07:11 AM
Backup solution Dannydy Linux - Newbie 5 10-12-2004 03:22 AM
What is the best solution for backup? jml75 Linux - Hardware 2 07-25-2004 09:50 AM
Looking for a backup solution Seventh Linux - Software 2 04-27-2004 12:55 PM
Backup solution NSKL Linux - General 4 11-29-2002 07:12 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:31 AM.

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