Backup dir - add date to deleted files


I use rclone to backup files from my NextCloud to pCloud account:

rclone sync Hetzner:/ pCloud:/NextCloud --checksum --progress --transfers=32 --exclude '*.DS_Store' --exclude '.DS_Store' --exclude '.Trash/**' --backup-dir=pCloud:/Deleted

Is it possible to add date (or some random string) to files that are deleted and moved to backup dir?

hello and welcome to the forum,

this is an example of forever forward incremental backups.
it does not add the date to the strings, it puts deleted files into a dated subdir.
i find this better than renaming files.
tweak as needed.

rclone sync /home/user01/source remote:full --backup-dir=remote:incrementals/`date +%Y%m%d.%I%M%S`

but if you want to add some string to the filename, try --suffix, with or without --backup-dir

1 Like

Thanks! date +%Y%m%d.%I%M%S solve my problem.

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