62

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.

you are viewing a single comment's thread
view the rest of the comments
[-] TheCaconym@hexbear.net 4 points 1 year ago* (last edited 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

this post was submitted on 21 Oct 2023
62 points (100.0% liked)

Linux

48741 readers
1214 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS