Hi,

I currently use a program called copywhiz on windows that backs up any files or directories created after a certain date to a usb hard drive and runs once a day.

I want to transition fully to Linux. Is there any easy to use software that works on Linux that can do this?

P.S. I have tried creating a bash script to do this but for some reason it has trouble with the date part. So a software solution would be prefered.

  • TheCaconym [any]@hexbear.net
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    If the aim is simply to mirror an existing directory, including mirroring suppression/deletions/new files/edits, and only copying what has changed (which is what I suspect you were trying to emulate with the “created after a certain date” thing), just do:

    rsync -avh -P /path/to/source/ /path/to/destination
    

    If the aim is to copy all files created since, say, three days ago, but not to update existing files or to remove files that have been removed from your source (which is what you described):

    rsync -avh -P --ignore-existing --files-from=<(find -L /path/to/source -ctime -3 -exec basename {} \;) /path/to/source/ /path/to/destination
    

    Edit: lemmy is html encoding my “lesser than” symbol in the second command above; replace accordingly