--min-age with shared folder not working


#1

Hello,
thank you again for this great tool;)

I am trying to backup with versioning like this:

rclone purge "\\server\BACKUP\old" --min-age 3d --dry-run -P
rclone sync "c:\folder" "\\server\BACKUP\current" --backup-dir "\\server\BACKUP\old\%date:~-10,2%-%date:~-7,2%-%date:~-4,4% %time:~-11,2%h%time:~-8,2%m%time:~-5,2%s" -P

however, --min-age does not seem to be correctly interpreted, i think the date of the file “old” impact and if it is more than 3 days old, then all its contents are deleted.

I have the same thing with “delete”.


#2

I think purge removes everything.

You’d want to use rclone delete I believe.

Can you run the command with -vv and share the output?


#3

n this example we realize that it removes everything, whereas I asked to delete only the elements older than an hour …

rclone delete "\\server\BACKUP\old" --min-age 1h --dry-run -vv
2019/03/14 14:06:56 DEBUG : --min-age 1h0m0s to 2019-03-14 13:06:56.386377 +0100 CET m=-3599.984929399
2019/03/14 14:06:56 DEBUG : rclone: Version "v1.43.1" starting with parameters ["rclone" "delete" "\\\\server\\BACKUP\\old" "--min-age" "1h" "--dry-run" "-vv"]
2019/03/14 14:06:56 INFO  : Waiting for deletions to finish
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/IDENTIFIANTS.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/INFOS_LISTE.ndx: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/INFOS_LISTE.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/SYNCHRONISATIONS_INFOS.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/LICENCES.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/LICENCES.ndx: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/SYNCHRONISATIONS.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/TRAITEMENTS.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/TRAITEMENTS.ndx: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/LICENCES.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/IDENTIFIANTS.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/INFOS_LISTE.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/INFOS_LISTE.ndx: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/LICENCES.ndx: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/SYNCHRONISATIONS_INFOS.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/TRAITEMENTS.FIC: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/TRAITEMENTS.ndx: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019  9h59m46s/Mise à jour/C-AGENT - MiseAJour - Compte-rendu.TXT: Not deleting as --dry-run
2019/03/14 14:06:56 NOTICE: 14-03-2019 14h05m44s/Mise à jour/C-AGENT - MiseAJour - Compte-rendu.TXT: Not deleting as --dry-run
2019/03/14 14:06:56 DEBUG : 2 go routines active
2019/03/14 14:06:56 DEBUG : rclone: Version "v1.43.1" finishing with parameters ["rclone" "delete" "\\\\server\\BACKUP\\old" "--min-age" "1h" "--dry-run" "-vv"]

#4

So that looks right to me as those files are older than 1 hour. Is that what you were expecting?


#5

unfortunately no, there are files of 14h05m44s: /


#6

14 hours is older than 1 hours as you specified.

  --min-age Duration                             Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)

What are you trying to do?


#7

I would like in this example to automatically delete files created more than an hour ago


#8

That looks right based on the output. Is there a file that is missing from there that you’d expect?

rclone ls and share the output.


#9

so I do not understand.
this script is executed at: 14h56m56s

there are files with 2 different date which corresponds to my backup date:
_9h59m46s (about 5H)
_14h05m44s (about 1 minute)

it should only have files dating from 9h59m46s that should be concerned no?


#10

As I asked, can you please run a rclone ls on that file and share that output?


#11

Also, you have an old version. Can you update to the latest stable as I’m testing on that as well as you have 1.43


#12

voici un rclone ls

   143272 14-03-2019  9h59m46s/IDENTIFIANTS.FIC
   629228 14-03-2019  9h59m46s/INFOS_LISTE.FIC
   230431 14-03-2019  9h59m46s/INFOS_LISTE.ndx
     2668 14-03-2019  9h59m46s/LICENCES.FIC
    26138 14-03-2019  9h59m46s/LICENCES.ndx
  2737091 14-03-2019  9h59m46s/SYNCHRONISATIONS.FIC
  2737091 14-03-2019  9h59m46s/SYNCHRONISATIONS_INFOS.FIC
    82168 14-03-2019  9h59m46s/TRAITEMENTS.FIC
    74988 14-03-2019  9h59m46s/TRAITEMENTS.ndx
   143272 14-03-2019 14h05m44s/IDENTIFIANTS.FIC
   629228 14-03-2019 14h05m44s/INFOS_LISTE.FIC
   230431 14-03-2019 14h05m44s/INFOS_LISTE.ndx
     2668 14-03-2019 14h05m44s/LICENCES.FIC
    26138 14-03-2019 14h05m44s/LICENCES.ndx
  2737091 14-03-2019 14h05m44s/SYNCHRONISATIONS_INFOS.FIC
    82168 14-03-2019 14h05m44s/TRAITEMENTS.FIC
    74988 14-03-2019 14h05m44s/TRAITEMENTS.ndx
      288 14-03-2019  9h59m46s/Mise à jour/C-AGENT - MiseAJour - Compte-rendu.TXT
      288 14-03-2019 14h05m44s/Mise à jour/C-AGENT - MiseAJour - Compte-rendu.TXT

#13

I think I understood, the folder14-03-2019 14h05m44s corresponds to the moment of my backup, and therefore when moving these files.
my last date of changes to my files is 14/03/2019 09h59m that’s why my filter is not good.

I should be able to indicate that I want to keep the last 3 folderfor example …


#14

or -well change the date of each file moved with the option --backup-dir


#15

no one was faced with this problem?


#16

If you are looking for a new feature, you can always open up an issue on the github as a feature request.

If your goal is to make backups and versions and such, perhaps try https://restic.net/ or something along those lines that handles backup and such much better.


#17

ok !
many thanks