LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-26-2015, 03:20 PM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Rep: Reputation: 38
Need someone to look at rsync script


I am using rsync to backup some files from /home/joe/ to a flash drive: /linux/media/joe/

rsync is copying some files over that I don't want. I am hoping someone can look at my backup script and filter file and show me what I am doing wrong. I have researched a lot about this program, but am apparantly missing something.

This is my backup script:
Quote:
#!/bin/bash

# Flash backup script


#The source directory:
SRC="/home/joe/"

#The target directory:
TRG="/media/linux/joe/"

#The rsync options:
OPT="-av --numeric-ids --delete --delete-excluded --filter=merge_/home/joe/bin/scripts/filter-rule-flash.txt"

#Execute the backup
rsync $OPT $SRC $TRG
This is the filter-rule file:
Quote:
- /downloads/
- /audacity/
- /videos/
- /.cache/
- /.gvfs/
The script still copies /video over but I din't see .cache/ or .gvfs/ but I stopped after it started copying video files.

I don't know what could be the problem except maybe the quotes in the OPT variable in the script

Thanks for help

Last edited by JosephS; 04-26-2015 at 03:22 PM.
 
Old 04-26-2015, 05:50 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,165

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
The filter command is quite complex try using the simpler '--exclude-from=FILE' instead.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script issue Rsync sedna06 Linux - General 5 01-06-2014 07:07 AM
rsync backup script help henryyy Linux - Newbie 7 03-05-2013 02:31 PM
Rsync script help lleb Linux - Software 17 11-18-2011 03:30 PM
Question on rsync script, not doing what it should be doing... JockVSJock Programming 5 01-03-2010 02:07 PM
rsync script twantrd Programming 2 01-06-2005 05:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:41 AM.

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