LinuxQuestions.org
Review your favorite Linux distribution.
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 01-27-2009, 01:55 PM   #1
EarthAndAllStars
LQ Newbie
 
Registered: Nov 2007
Location: Texas
Distribution: Ubuntu 8.04
Posts: 12

Rep: Reputation: 0
Incremental backup software for a mixed environment


I'm setting up a home server with Ubuntu 8.10 and I want backup software that does nightly backups of files located on shared folders. Some folders will be from Linux boxes, some will be Windows shares.

Any suggestions?
 
Old 01-27-2009, 03:13 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
If the folders are mounted on the machine that will hold the backups, you can simply use rsync & run it on a cron job.

something like:

Code:
rsync -ax --delete /source/mount/location/ /local/backup/location/sourcename_for_clarity/
will do the backup (note: trailing slashes have meaning. in this case, you're asking to sync everything inside, but not including "location" to everything inside but not include "sourcename_for_clarity")

then, to run it nightly, simply run "crontab -e" and add the rsync like so:

Code:
0 0 * * * rsync -ax --delete /source/mount/location/ /local/backup/location/sourcename_for_clarity/
which says (in order):
0 - the 0'th minute of the hour (i.e. 1:00 or 12:00 or 5:00)
0 - the 0'th hour of the day (i.e. midnight)
* - every day of the month
* - every month of the year
* - every day of the week

... so it will run at midnight, every day.

you can have several lines in one cron to do all backups like so:

Code:
0 0 * * * rsync -ax --delete /source/mount/location1/ /local/backup/location/sourcename_for_clarity1/
0 0 * * * rsync -ax --delete /source/mount/location2/ /local/backup/location/sourcename_for_clarity2/
0 0 * * * rsync -ax --delete /source/mount/location3/ /local/backup/location/sourcename_for_clarity3/
so, as a pratical example, if you had a windows share mounted to your linux machine as /mnt/windows/my_mp3s, the rsync cron might look like:

Code:
0 0 * * * rsync -ax --delete /mnt/windows/my_mp3s /home/EarthAndAllStars/backups/windows/

which would copy the directory /mnt/windows/my_mp3s and its contents into /home/EarthAndAllStars/backups/windows/, copying only changed data, deleting files in the backup location that have been deleted on the share, and maintaining all file information like timestamps and such.

This is all a "pull" from the backup machine. If you're looking for a push from the windows machine.. well.. maybe that's a question for WindowsQuestions.org. (which is to say, I don't have a good answer that doesn't involve installing MS's UNIX Tools so that you get rsync & cron jobs).

Last edited by BrianK; 01-27-2009 at 03:16 PM.
 
  


Reply

Tags
backup



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
incremental backup jdeeptir Linux - Newbie 5 05-24-2008 06:51 PM
Kerberos in a mixed environment cygnus-x1 Linux - Security 1 09-22-2006 10:59 AM
About incremental backup satimis Linux - Software 0 06-15-2006 04:01 AM
incremental backup .... redrobin77 Linux - Software 1 01-31-2006 05:29 AM
Backup Software for mixed environment jedimastermopar Linux - General 2 09-24-2004 03:34 PM

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

All times are GMT -5. The time now is 06:20 PM.

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