[resolved] filter / delete files the way rsync uses its exclude list?

edit: discovered the "--delete-excluded" - option for rsync just minutes after posting this question. rsyncing the backup to its parant directory with that option added seems to do the job.
edit: No, it doesn't. It just pretends to do the job, but doesn't really seem to delete the files.
edit: Oh god, I had --backup still activated. It did work - it just made another backup into another sub directory every time I tried. Now to clean up that mess....
edit: AND also "-b" was still in there. Will I ever learn from my mistakes?
Hi!
After updating my list of rsync excludes to be more accurate over the last weeks, I have a lot of trash still stuck in the old backups / increments. I'd like to delete those, that whould have been excluded by rsync using the new exclude file / list. Can't really find a good method, though.
To get the list of files, that...:
for expression in $(cat /home/user/scripts/backup.exclude); do find /media/BACKUP/ -regex ".*$expression.*"; done;
... seems to differ from the way rsync handles the expressions when it comes to regex special characters (*./) ... not sure how rsync does it exactly, but it works.
Is there anything that handles that better? Maybe use rsync in a way I didn't think of (sync folder with itsself in some way) or something?
thx!
Last edited by whoops (2011-03-11 12:51:57)

I use the combination of "--exclude-from" and "--delete" switch to keep all the garbage folders from my backups.
But it took a while to figure out the syntax to use in the file the "--exclude-from" switch references.  Funny how that important piece of information is never covered in any of the tutorials I could find on rsync out there.  Only this past week-end did I finally figure it out.
I had been putting absolute paths into that file for folders I didn't want to back up, for example "/home/me/.thumbnails/normal/*", but that folder kept getting backed up anyway.  Finally I paid more attention to the output on the screen going by during the backup and saw that rsync considered that folder to be named ".thumbnails/normal/".  Once I put ".thumbnails/normal/*" into the excluded files list, and all the other folders on separate lines accordingly, I finally achieved what I was looking for -- none of my "garbage" folders were being backed up and any file not found in my source folders were deleted from the target folders.
You didn't post the switches you were using for rsync but here's what mine looks like:
rsync -avr --exclude-from=/home/me/bin/exclude_from_backup.txt --delete /home/me/ /media/backup/home/me/
Hope this helps.

Similar Messages

  • I want to be able to pick my saved websites the way it use to be listed?

    I can never find the bookmarks I have saved like I use to. I want to be able to see them listed when you open the bookmark tab like it use to be.

    <s>I am not suoay be comparing this with. </s>
    '''edit''' ''I am not sure exactly what you are trying or which Firefox version you may be comparing this with.
    If you use the keyboard shortcut Ctrl + B that will open the bookmarks in a sidebar. One method of opening the full bookmarks library Window is to use the bookmarks icon (grid-like) and take the "Show All Bookmarks" option.
    One possibility is that you have moved some bookmarks or folders. Explore the bookmarks as seen in the Library, are the bookmarks simply moved ?
    Are your bookmarks still working ok ?
    For instance are you able to add a bookmark for this question ?
    * see [[Use bookmark folders to organize your bookmarks]]
    * Also see [[Recover lost or missing Bookmarks]] although I am not sure if the article applies to your situation.

  • Is there the way to use "Highlight File Format" with Acrobat Reader 9.0 or later?

    hi
    Do anyone know the way to use "Highlight File Format" with Acrobat Reader 9.0 later or substitutional way to highlight a PDF file as well as highlight file?
    I want to highlight some words by indicating character's location(from n to m) using Acrobat Reader 6, 7, 8, and 9.
    I use highlight xml file to highlight words in Acrobat 6, 7, and 8.
    http://www.adobe.com/devnet/pdf/pdfs/HighlightFileFormat.pdf
    According to this documents, "External Window Handler Plugin" is required to use highlight file.
    But I cannot find this plugin in Acrobat Reader 9.
    So Acrobat Reader doesn't recognize highlight file.
    Well, I know that there is another way to highlight pdf file. It is called "PDF Open Parameters".
    However this parameters cannot indicate location of characters but words which is to be searched.
    This parameter does not work perfectly to substitute a highlight xml file.
    To satisfy what i want to do, the best solution is that Acrobat Reader 9.0 recognizes highlight xml file.
    But I think it is impossible because of lack of plugin.
    Do anyone know the way to recognize a highlight xml file to 9.0 or another way to highlight some words?
    thanks,
    Asatamax

    The feature is disabled by default in reader 9
    (1) Open Adobe Reader
    (2) Click Edit > Preferences > Search, and
    (3) check the box labelled Enable search highlights from external highlight server.
    (response found here: http://support.dtsearch.com/dts0117.htm)
    I can't imagine why Adobe choose to disable it. It's a bad joke for us at UNESCO (http://unesdoc.unesco.org)

  • FAQ: Revel Transition basics: How does this affect the way I use my Adobe software?

    Q: How will this change the way I use my Elements software?
    A: Once you have migrated your files from Photoshop.com to Revel, it will be no longer be possible to sync your photo and video files between your Photoshop Elements Organizer and Photoshop.com.
    If you're using Photoshop Elements 11, you can share your JPEGs from the Elements Organizer to AdobeRevel.com.
    If you’re using Photoshop Elements 10 or earlier version, you won’t be able to directly import from Revel or export to Revel.
    Q: How will this change the way I use Photoshop.com?
    A: Photoshop.com accounts will be remain accessible until the end of the transition period CLICK HERE to see dates and details, but once we begin moving your photos to Revel you will no longer be able to upload photos to your Photoshop.com account.
    After the transition period CLICK HERE to see dates and details, all Photoshop.com accounts will be closed. The Photoshop.com website will remain live and continue to offer product information, trial software downloads, photo editing functionality, customer spotlights, tutorials, and other resources.

    very_nice wrote:
    The suggested advice in this support article http://support.apple.com/kb/HT1478 wasn't a help at all, because the option "enable disc use" in the summary window of itunes doesn't appear.
    *From the article*:
    Products Affected
    iTunes 7 for Mac, iTunes 7 for Windows, iPod nano, iPod shuffle, iPod mini, iPod, iTunes 8 for >Windows, iTunes 8 for Mac
    No mention of the Touch, it works differently from other iPods and has no "disk mode" as such.
    I think it can be used as a storage device by using a 3rd party App, search the the App Store for such items.
    Photos transferred to your Touch via iTunes will be of severely compromised quality i.e 640x480 pixel resolution and file size around 600-700 kb. These can be retrieved, again using a 3rd party application on your computer, such as [Touch Copy|http://www.wideanglesoftware.com/touchcopy> but you will not get back original quality images.
    Good luck,
    Dud.

  • What's the way to use the tab button while writing...

    can u tell me?
    whts the way to use tab button while writting in quick office.
    Moderator's Note: Post was moved and changed the title into a subject-related title. This is to keep the forum organized and let other forum users easily see and respond to this post.
    Solved!
    Go to Solution.

    Hi, minhaz784221. To clarify, are you looking for the tab button function on your phone's keyboard to use in the Quickoffice app? If yes, you'll need to press the space bar multiple times to create an indent on your paragraphs. If this does not resolve your inquiry, feel free to add more details in your reply. Keep us posted.

  • I put my iPad into DFU mode without thinking much about it. I didn't realize I would lose everything. Is there a way to get everything back the way I used to have it before I tried recovering my iPad?

    A couple of days ago my iPad died, so I plugged it in to charge. It went into a rebooting loop, and when I looked up how to fix this, I saw that I can put my iPad into DFU mode to fix certain things like this. I did, not thinking much about it because l had seen both of my parents get new phones and everything was slowly but surely on their phone the way it was on their old phones.
    I thought that even though I agreed to the iPad being put back into factory settings, I thought I would be able to get everything back the way it used to be just by logging into iCloud when setting it up. I was wrong. This is a school iPad, so all of my notes are gone. The only things that were backed up were my photos. All the games, social media, etc. that I had downloaded prior were gone. Even my notes.
    Is there a way I can get everything back to the way it used to be, or was agreeing to put the iPad back into factory settings the wrong thing to do? Was it a mistake to take it upon myself to fix my iPad in this restarting loop? I would really like to get everything back, especially my school notes.

    The only way to get everything back is by restoring a backup. If you didn't have a backup, there is nothing that you can do to recover your lost documents and your notes. If you have a backup restore the backup in order to recover your data. Purchased apps can always be downloaded again as long as you use the same Apple ID that you bought them with, but data can only be recovered from a backup or if you have copies of the documents and notes on a computer.
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support

  • Hi, Unfortunately my Laptop has died (which had my iTunes on it). I want to ensure my music on my iPhone 5 and my iPad Air are backed up. Also, I want to sort my music in the way I used to with iTunes. How can I do this with just these two devices?

    Hi, Unfortunately my Laptop has died (which had my iTunes on it). I want to ensure my music on my iPhone 5 and my iPad Air are backed up. Also, I want to sort my music in the way I used to with iTunes. How can I do this with just these two devices, i.e. NO Computer? Can the iCloud help? Why can't I download iTunes (i.e. my library as I saw it on the computer) to these devices? Thanks to anyone who can help me here.

    You can change the email address of one's appleID...
    I'd recommend changing moms email to yours to get a good backup on the Mac
    Then switch mom's back to hers
    Then change your account to the same email you used.
    I've done something similar when I needed to update my Apple account (one ID changing email addresses and phone)

  • Is there is a way to change the "Find and Replace" feature in Numbers 3.2 back to the way it used to be on Numbers '09 version 2.3?

    In order to view my documents on my newly purchased Macbook Air I recently had to upgrade my 27" iMac to Numbers 3.2.  The new version does fine for what I use it for except the new "find and replace" feature...It is TERRIBLE! It is so much slower than the older version.  Plus I loved how the older version showed a table of all the matching word or items you're searching for and you could easily scroll through them to find the one that you were searching for.
    My question is: Can you change the Find and Replace feature back to the way it used to be in version 2.3 or Number '09?  If so, please show me how.  I would really appreciate it.
    The image below shows the new version on the left and the old version on the right just in case you don't know what I'm talking about...
    Thank you.

    Hi The.Gav,
    Sad to say, but that feature has gone in Numbers 3.2
    This discussion may help (or not)
    Numbers - How use Find like the previous version?
    Regards,
    Ian.

  • Facebook is not loading properly and all my text and images are lined up along the right side of the page. How can this get fixed to the way it use to be?

    Facebook is not loading properly and all my text and images are lined up along the right side of the page. How can this get fixed to the way it use to look?
    Everyone who logs into Facebook on my Firefox has this problem however if we use Internet Explorer - facebook looks normal.

    If you have increased the minimum font size then try the default setting "none" as a high value can cause issues like you described.
    * Tools > Options > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    *Tools > Options > Content : Fonts & Colors > Advanced > [X] "Allow pages to choose their own fonts, instead of my selections above"

  • How do I make New window open maximized the way it used to?

    How do I make New window open maximized the way it used to?

    { Ctrl + B } opens and closes the Bookmarks Sidebar.

  • Question When I do a search for an image I only have a limited number of images. There used to be a ton of pictures on my screen and an unlimited amount of pictures to look through. Is there a way of changing this back to the way it used to be???

    Question
    When I do a search for an image I only have a limited number of images. There used to be a ton of pictures on my screen and an unlimited amount of pictures to look through. Is there a way of changing this back to the way it used to be???

    Thanks.  So there's no means of knowing whether a text message has been delivered, not to mention time of delivery.  Perhaps I've gone for the wrong phone.  It might do a lot but seems to miss out on some basics.

  • What is wrong with Firefox ---It will not pull up anything the way it used to --having to use exployer instead ---Help

    What is wrong with Firefox ---It will not pull up anything the way it used to --having to use exployer instead ---Help
    The catalog of our University will not pull up properly on Firefox but will on internet exployer Why?

    The #rdn# is a url variable that is pass to this form from
    another page. I put it in a hidden filed and originallly used it as
    from.rdn. That did not make a difference, so I just used rdn.
    The cfoutput to display the rdn, partnumberid,
    deliverynumber, totalrows, and row, all display properly. I even
    use those in the query anlayzer and the update works.
    I will remove the crparam and see if that makes any
    difference. This is very frustrating since there are no error
    messages and I am led to believe the code works.

  • My ipod touch has been stuck in recovery mode for like 3 months and ive downloaded the newest itunes but itunes still wont recognize it!!! PLease Help by the way im using a macbook!!!!

    My ipod touch has been stuck in recovery mode for like 3 months and ive downloaded the newest itunes but itunes still wont recognize it!!! PLease Help by the way im using a macbook!!!!          
    PLEASE HELP!!!!!!

    Have you been through the steps mentioned in this article? iOS: Device recognized in iTunes for Mac OS X

  • How do I change my short name on Yosemite OS X? I can't seem to do it the way I used to change it all the time on Mavericks.

    I can't seem to do it the way I used to change it all the time on Mavericks.
    There was a text box after I clicked on the lock after I went to Users and Groups in System Preferences, but now it's gone.
    By short name, I mean the name that appears on your lock screen when you log in.
    P.S. I use a MacBook Air Early 2014 version, 13-inch.
    I upgraded to Yosemite 2 days ago.

    I found how to do it.
    Go to SystemPreferences - Users&Groups - Right-click on your account at the left hand side bar- change your FULL NAME ONLY
    If you change anything else the system might break but changing the full name causes no damage.
    So I changed my name and am working fine with my Mac.
    Cheers!
    mollaturnup

  • How can i get the value stored in the session object using its sessionid

    how can i get the value stored in the session object using its sessionid by running stand alone java application

    myforum wrote:
    how can i get the value stored in the session object using its sessionid by running stand alone java applicationThis does not seem to make sense! You need at least to give a lot more detail of what you are doing.

Maybe you are looking for

  • Nokia 3110 Classic - Some settings :/

    I just upgraded my phone from Nokia 2100 to Nokia 3110 Classic (finally, yay.) In my 2100 I had a couple of settings I used. a) Setting to change the amount of time the phone lights up. b) Setting to change how long the phone waits before going into

  • Full screen movie on video output

    Hi. I don't know if someone has addressed this question already. But I sure as **** could not find it. I hooked up my Philips 32" digital widescreen flat TV to my iMac 20" via HDMI cable. Everything works fine, except i'm trying to project a movie on

  • Cannot update QuickTime

    I am trying to install the new version of Quick Time and iTunes but the i keep on getting an error message saying that the HKEY_LOCAL_MACHINE\Software\Classes\QuickTime.Quic kTime\CLSID. key cannot be unlocked. I have never adited anything with the R

  • Do we need to recompile entire code base ?

    Do we need to recompile the entire code base to utilize the efficiency of a Sun SPARC Enterprise T5220 Server. We will not be able to perform any of the optimization on the code, as it affects the working nature of the product. So I'm not able to uti

  • Why does InDesign crash when pasting from another InDesign document after upgrading to Mountain Lion?

    Model Name:          iMac   Model Identifier:          iMac10,1   Processor Name:          Intel Core 2 Duo   Processor Speed:          3.06 GHz   Number of Processors:          1   Total Number of Cores:          2   L2 Cache:          3 MB   Memory