Transfer based on specific date

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

I want to sync only the data created after a certain date every day.

Using the --max-age option requires me to change the value of max-age every day.

A method is needed to sync only data created before or after a specific date and time.

Super easy. You can use absolute date and time as per docs:

These can also be specified as an absolute time in the following formats:

  • RFC3339 - e.g. 2006-01-02T15:04:05Z or 2006-01-02T15:04:05+07:00
  • ISO8601 Date and time, local timezone - 2006-01-02T15:04:05
  • ISO8601 Date and time, local timezone - 2006-01-02 15:04:05
  • ISO8601 Date - 2006-01-02 (YYYY-MM-DD)

It is worth to read documentation sometimes...

The above is understood as Time Format.

Which option can I use to sync only data befor or after a certain time?

Please give me an example.

All those are examples of dates before January, 2nd 2006 at 15:04:05.

So depending on what you want, set the proper date/time.

rclone sync [src] [dst] 200-01-02 15:04:05

I don't think I can use it like this because there is a space in the middle. How should I use it for before or after time?

Check out the docs:

Rclone Filtering

As i don't know what how you want to filter. Your first post talks about max-age so you use a date with max age.

Please check my post again.

In order for max-age to sync every day based on a specific time, the time of max-age must be changed every day.

ex) To sync data from 3 days ago based on now every day
1st day : --max-age=3d
2nd day : --max-age=4d
3rd day : --max-age=5d

I try to sync only the data after a certain time every day.
I couldn't find a suitable option for this.

I did read your post. Thanks for that.

Based on your example below.

Isn't that just 1st day Jan 1, 2nd day is also Jan 1 and 3rd day is also Jan 1 so you'd set the date to Jan 1 and be done?

Yes, I want to pin it to a specific date.
I want to run the same command every day. to sync.

Just put in whatever date you want then:

texter@macmini Downloads % rclone lsl GD:
       -1 2022-09-16 12:04:08.402000000 Joeisms.docx
texter@macmini Downloads % rclone ls GD: --max-age 2022-09-15
       -1 Joeisms.docx

1 Like

Thank you. ^.
It appears to be operating normally in 'rclone ls'.
I will try to check the operation in 'rclone sync'.

1 Like

Today is 2023-11-30.
When I use below command. rclone output error.
Can you tell me the reason?
I think the result of this command is empty list.

$ rclone ls /mnt_rg --max-age=2023-12-01
2023/11/30 14:36:09 ERROR : #recycle: error listing: failed to read directory entry: readdirent /mnt_rg/#recycle: permission denied
2023/11/30 14:36:11 ERROR : @ActiveBackup/FS-f2a2d679fc0b1262b7a4951aed3f3e4e: error listing: directory not found

looks like the source is a synology device, correct?
#recycle requires root user
so could try --exclude='#recycle'

fwiw, run commands with -vv for debug output

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.