--suffix and --suffix-keep-extension issues

What is the problem you are having with rclone?

rclone is incorrectly naming files that are moved to the backup directory during sync. An example of a file that is renamed and moved to the backup directory is PKREV4~V

What is your rclone version (output from rclone version)

rclone v1.51.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Linux (unRaid), 64 bit

Which cloud storage system are you using? (eg Google Drive)

Google Drive, DropBox, Box

The command you were trying to run (eg rclone copy /tmp remote:tmp)

ARCHIVE="/mnt/user/Backups/Dropbox Archive/"
cdate=`date +"%Y-%m-%d %T"` # get date and format it
rclone sync "$SOURCE" "$DEST" \
                    --verbose \
                    --drive-alternate-export \
                    --backup-dir "$ARCHIVE" --suffix "$cdate" --suffix-keep-extension

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2020/02/19 14:01:49 INFO : Computer Backup/PASS.xlsx: Moved (server side)
2020/02/19 14:01:50 INFO : Computer Backup/PASS.xlsx: Copied (new)
2020/02/19 14:01:51 INFO : Local file system at /mnt/user/Backups/Dropbox/: Waiting for checks to finish
2020/02/19 14:01:51 INFO : Local file system at /mnt/user/Backups/Dropbox/: Waiting for transfers to finish
2020/02/19 14:01:51 INFO : Waiting for deletions to finish
2020/02/19 14:01:51 INFO :
Transferred: 34k / 34 kBytes, 100%, 43.503 kBytes/s, ETA 0s
Checks: 225 / 225, 100%
Transferred: 1 / 1, 100%
Elapsed time: 0.7s

hello and welcome to the forum,

it is too soon to call this a bug.

your output shows just one file being transferred with errors.
can you provide details, what you expected to happen and what actually happened?


I expect rclone to move /mnt/user/Backups/Dropbox/Computer Backup/PASS.xlsx to /mnt/user/Backups/Dropbox Archive/Computer Backup/PASS-2020-02-19 12:23:23.xlsx

Instead it moves /mnt/user/Backups/Dropbox/Computer Backup/PASS.xlsx to /mnt/user/Backups/Dropbox Archive/Computer Backup/PKREV4~V

can you provide a few more examples?

It looks like this is the problem. It was storing the date as "2020-02-19 14:27:59" and (I assume) the space was expanded by the shell even though the variable was in quotes.

I removed the space from the date for the suffix and it now works as expected.

yes, i was going to suggest that.

space character in commands, pathnames and filenames are always a problem.

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