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. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
01-20-2005, 01:27 AM
|
#1
|
LQ Newbie
Registered: Dec 2004
Posts: 27
Rep:
|
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.
|
|
|
01-20-2005, 01:49 AM
|
#2
|
Senior Member
Registered: Oct 2003
Posts: 3,057
Rep:
|
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
|
|
|
01-20-2005, 02:18 AM
|
#3
|
Member
Registered: Apr 2004
Distribution: Slackware 9.1/10.1, Mandrake 9.1/10.1
Posts: 75
Rep:
|
Try this:
http://www.rsnapshot.org/
You can control the snapshot interval and how many snapshots to keep, it will rotate the snapshots for you, very handly.
|
|
|
01-20-2005, 02:20 AM
|
#4
|
LQ Newbie
Registered: Dec 2004
Posts: 27
Original Poster
Rep:
|
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.
|
|
|
01-20-2005, 09:41 AM
|
#5
|
Senior Member
Registered: Oct 2003
Posts: 3,057
Rep:
|
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
|
|
|
01-22-2005, 09:40 AM
|
#6
|
Member
Registered: Sep 2004
Location: NJ
Distribution: Gentoo
Posts: 104
Rep:
|
A backup application
Mondo - this is what i use (and many others) to backup my server. By using CRON i can create backup schedules.
|
|
|
01-23-2005, 05:26 AM
|
#7
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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.
|
|
|
All times are GMT -5. The time now is 12:02 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|