Find the answer to your Linux question:
Results 1 to 3 of 3
Like Tree2Likes
  • 1 Post By Lakshmipathi
  • 1 Post By rajesh00749
How do I exclude these folder and files? rsync -vaP --delete --exclude="/home/lance/.cache" --exclude='/home/lance/.gnome2_private' --exclude='/home/lance/.local/share/Trash' --exclude='/home/lance/.mplayer' --exclude='/home/lance/.thumbnails' --exclude='/home/lance/.VirtualBox' --exclude='/home/lance/Downloads' --exclude='/home/lance/dwhelper' --exclude='/home/lance/linux/download' --exclude='/home/lance/VirtualBox*VMs' /home/lance/ /media/lance/TOSHIBA*EXT/fedora19backup/localhome They keep showing up in my backup....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jan 2010
    Location
    usa
    Posts
    149

    rsync --exclude?


    How do I exclude these folder and files?

    rsync -vaP --delete --exclude="/home/lance/.cache" --exclude='/home/lance/.gnome2_private' --exclude='/home/lance/.local/share/Trash' --exclude='/home/lance/.mplayer' --exclude='/home/lance/.thumbnails' --exclude='/home/lance/.VirtualBox' --exclude='/home/lance/Downloads' --exclude='/home/lance/dwhelper' --exclude='/home/lance/linux/download' --exclude='/home/lance/VirtualBox*VMs' /home/lance/ /media/lance/TOSHIBA*EXT/fedora19backup/localhome

    They keep showing up in my backup.

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    linux - Simple RSync EXCLUDE option? - Stack Overflow says "paths given need to be relative to the source path (no absolute paths). "

    HTH
    docbop likes this.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Just Joined!
    Join Date
    Sep 2013
    Location
    Hyderabad
    Posts
    29
    dir is ur directory which u would like to exclude

    Exclude specific directory

    rsync -avz --exclude 'dir' source/ destination/

    Exculde a paricular file

    rsync -avz --exclude 'dir1/dir2/file3.txt' source/ destination/

    Exclude specific file type

    rsync -avz --exclude '*.txt' source/ destination/

    Exclude muyltiple files and directories at same time

    rsync -avz --exclude file1.txt --exclude dir3/file4.txt source/ destination/
    docbop likes this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •