LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-29-2010, 04:10 PM   #1
JeffElkins
LQ Newbie
 
Registered: Sep 2007
Posts: 18

Rep: Reputation: 0
rsync by date


I'm running a linux-based media server which I've been using rsync to backup to individual external USB hard drives based on content. For arguments sake, say I have a TV backup drive and a Movie backup drive. I've been using the following command to back up the TV drive:

sudo rsync --size-only -rltDvu --progress /rmedia/video/television/ /media/backup/television/

Now the TV backup drive is full and I want to start backing up to a new TV backup drive. How can I tell rsync to back up TV files that were created only after a certain date? IOW, I don't want to backup files that have already been backed up.

Last edited by JeffElkins; 01-29-2010 at 04:15 PM.
 
Old 01-30-2010, 06:02 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
I'd suggest creating a new directory named /media/video/television2. That
will allow you to keep your same backup method. Also it will let you know
which backup contains which files based on the directory on the server.
 
Old 01-30-2010, 06:53 AM   #3
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
It would be good to do the incremental backup which will only transfer the newly created files and the modified old ones.

--
Prasanta
 
Old 01-30-2010, 09:36 AM   #4
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
As an example,

rsync `find . -name "*.pdf" -mtime -60` prasanta@anothermachine:/tmp/

The above command would look for files with modified date less than 60 days and then copy across to another machine. Hope this helps.

--
Prasanta
 
Old 01-30-2010, 11:56 AM   #5
JeffElkins
LQ Newbie
 
Registered: Sep 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by prasanta View Post
As an example,

rsync `find . -name "*.pdf" -mtime -60` prasanta@anothermachine:/tmp/

The above command would look for files with modified date less than 60 days and then copy across to another machine. Hope this helps.

--
Prasanta
Thanks! Once I added an -R option to rsync this does exactly what I want.
 
  


Reply



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
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 03:23 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM
rsync file by newest date investmentbnker75 Programming 5 10-12-2008 10:44 PM
how to use rsync to update date/time only coontie Linux - Software 2 05-15-2006 11:13 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM

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

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