Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: rsync: Reliably copying files from local file system to NAS

  1. #11
    Join Date
    Jun 2011
    Beans
    29

    Re: rsync: Reliably copying files from local file system to NAS

    That could be an option. Another option could be to use find to put a list of all the files in a temporary file and then using --include-from=/tmp/filenames to copy just those files.

    How can I create such a temporary file with find so that database/session_*.db are included but database/session* are excluded?

  2. #12
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,791

    Re: rsync: Reliably copying files from local file system to NAS

    You can run rsync multiple times and first copy the important ones:
    rsync -a "/whatever/session_*.db" /wherever/

    Followed by the rest with a blanket exclude:
    rsync -a --exclude="*session*" /whatever/ /wherever/

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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