Now it is being observed, when we run above command second time, it deletes the files from storj that were deleted from our data directory (local) & backed-up in first time reclone sync command
We want rclone to keep all files that were previously backed-up and do only incremental backup to storj. so if any file deleted a month or year ago, we can retrieve it from storj regardless how many time we synced our data directory.
rclone copy compares and copy only modified and new files/directories to destination. Will it keep the older backup files of previous backup if deleted from source before new backup?
how to use --backup-dir and what will be its use?
you are right sync is not appropriate in my case it makes identical source and destination which is not requirement.
Is the following command well enough for incremental backup and keep save older backup files that were deleted from source? So we will be able to recover accidentally deleted files after a month or a year regardless how many time rclone copy run for incremental backup
You will need to add "--backup-dir remote:bucketname/backups/$(date -Is)" and change the copy to sync.
What this will do is store any files which were deleted or updated in the backups/2022-03-29T11:28:44+01:00 directory where the time shown is the time the command was run.
This assumes you are running Linux - you'll need a different command line for Windows.