Touch command doesn't work in pCloud


#1

Hey There,
for backup purposes I need to change the time of files copied by the --backup-dir flag. Indeed the copied files keep the timestamp from original files and I want to keep them only for a few weeks from the modified time.
I tried to touch the file in order to change the timestamp but I got an error.:

rclone touch -vvv pCloud:Backup/test.txt
2019/01/25 17:32:33 DEBUG : rclone: Version "v1.44-106-ge84790ef-fix-2740-swift-pacer-beta" starting with parameters ["rclone" "touch" "-vvv" "pCloud:Backup/test.txt"]
2019/01/25 17:32:34 ERROR : Attempt 1/3 failed with 0 errors and: touch: couldn't set mod time: can't set modified time
2019/01/25 17:32:35 ERROR : Attempt 2/3 failed with 0 errors and: touch: couldn't set mod time: can't set modified time
2019/01/25 17:32:36 ERROR : Attempt 3/3 failed with 0 errors and: touch: couldn't set mod time: can't set modified time
2019/01/25 17:32:36 Failed to touch: touch: couldn't set mod time: can't set modified time

Any Idea?


#2

Hmm, yes pcloud can’t actually set the modification time on a file without uploading it :frowning:

Normally rclone hides this from you, but in the case of rclone touch it can’t.

The only way of setting the modification time is to upload the file again in pcloud.


#3

Ok thanks.
So, I can’t use rclone directly to generate backups. I will have a look at restic that seems pretty good for backups. (I still use rclone for mirroring)


#4

Well you’ll have to think of a new strategy anyway…

You could use --suffix to add a date onto each file and prune them like that?

Restic can use rclone to backup to pcloud which should work pretty well :smile:


#5

I could probably achieve my goal with --suffix but it would be a lot of scripting. I will try with restic + rclone. First tests show that it works!!
Thank you really for all your efforts and the great job done on rclone.