How to copy files without rewriting older versions

Hello

I copy files from G Drive to \server\folder. How can I keep older version of files on the destination, if somebody change the file on the G drive?

You have a few options depending on what you want to happen:

https://rclone.org/docs/#backup-dir-dir

https://rclone.org/docs/#suffix-suffix

you did not provide any answers to the help template so not possible to provide a detailed answer or example source code.

I have used this command now

rclone copy Gdisk: /media/backdrive --suffix .old --suffix-keep-extension

so now I can see
file.txt
file.old.txt

I see it keeps one backup version. How can I keept more or unlimited count of versions? Like...
file.txt
file.old.txt
file.old.old.txt
file.old.old.old.txt
etc.

Thank you

if you want forever forward incremental backups, try this

rclone sync Gdisk: /media/backdrive/full --backup-dir=/media/backdrive/incrementals/`date +%Y%m%d.%I%M%S`

Thank you jojothehumanmonkey

What is %I%M%S after date suffix?

hour minute second

you can read about it here

or try

echo `date +%Y%m%d.%I%M%S`

Thanks again

I noticed that Google files are copied and converted to Incremental folder everytime I run copy even if the Google files were not changed since last copying. Do you know how to fix it?

i cannot see into your computer screen....

you need to post the command with the debug log

Hi, this is the command

And this is the log
ice@gdrive-sync:~$ rclone copy TestovaciDisk: /media/backdrive/TestovaciDiskFull --backup-dir=/media/backdrive/TestovaciDiskIncremental/date +%Y%m%d.%I%M%S
2021/05/19 06:05:53 ERROR : Úprava admin oprávnění.txt: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Úprava admin oprávnění.txt: operation not permitted
2021/05/19 06:05:53 ERROR : Úprava admin oprávnění.bat: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Úprava admin oprávnění.bat: operation not permitted
2021/05/19 06:05:53 ERROR : Robotizované pracoviště.png: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Robotizované pracoviště.png: operation not permitted
2021/05/19 06:05:53 ERROR : ice_lego_stopky/ice_lego_stopky_v0/index.html: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/index.html: operation not permitted
2021/05/19 06:05:53 ERROR : ice_lego_stopky/ice_lego_stopky_v0/script.js: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/script.js: operation not permitted
2021/05/19 06:05:53 ERROR : ice_lego_stopky/ice_lego_stopky_v1/index.html: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/index.html: operation not permitted
2021/05/19 06:05:53 ERROR : ice_lego_stopky/ice_lego_stopky_v1/stylesheet.css: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/stylesheet.css: operation not permitted
2021/05/19 06:05:53 ERROR : ice_lego_stopky/ice_lego_stopky_v0/stylesheet.css: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/stylesheet.css: operation not permitted
2021/05/19 06:05:53 ERROR : ice_lego_stopky/ice_lego_stopky_v1/script.js: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/script.js: operation not permitted
2021/05/19 06:05:53 ERROR : CrystalDiskInfo8_0_0.exe: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/CrystalDiskInfo8_0_0.exe: operation not permitted
2021/05/19 06:05:53 ERROR : ice_lego_stopky/ice_lego_stopky_v0/graphics/ICE logo.svg: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/graphics/ICE logo.svg: operation not permitted
2021/05/19 06:05:54 ERROR : ice_lego_stopky/ice_lego_stopky_v1/graphics/ICE logo.svg: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/graphics/ICE logo.svg: operation not permitted
2021/05/19 06:05:54 ERROR : Test onboarding.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Test onboarding.docx: operation not permitted
2021/05/19 06:05:54 ERROR : Test onboarding.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Test onboarding.docx: operation not permitted
2021/05/19 06:05:55 ERROR : TestAleš/Testovací dokument.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/TestAleš/Testovací dokument.docx: operation not permitted
2021/05/19 06:05:55 ERROR : TestAleš/Testovací dokument.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/TestAleš/Testovací dokument.docx: operation not permitted
2021/05/19 06:05:55 ERROR : Hymbajs/GScript/Project folder.xlsx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Hymbajs/GScript/Project folder.xlsx: operation not permitted
2021/05/19 06:05:55 ERROR : Hymbajs/GScript/Project folder.xlsx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Hymbajs/GScript/Project folder.xlsx: operation not permitted
2021/05/19 06:06:16 ERROR : Dominik/Electric_P8_2.2.5.6338.zip: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Dominik/Electric_P8_2.2.5.6338.zip: operation not permitted
2021/05/19 06:06:16 ERROR : Attempt 1/3 failed with 16 errors and: chtimes /media/backdrive/TestovaciDiskFull/Dominik/Electric_P8_2.2.5.6338.zip: operation not permitted
2021/05/19 06:06:16 ERROR : Úprava admin oprávnění.bat: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Úprava admin oprávnění.bat: operation not permitted
2021/05/19 06:06:16 ERROR : Úprava admin oprávnění.txt: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Úprava admin oprávnění.txt: operation not permitted
2021/05/19 06:06:16 ERROR : Robotizované pracoviště.png: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Robotizované pracoviště.png: operation not permitted
2021/05/19 06:06:16 ERROR : CrystalDiskInfo8_0_0.exe: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/CrystalDiskInfo8_0_0.exe: operation not permitted
2021/05/19 06:06:17 ERROR : ice_lego_stopky/ice_lego_stopky_v1/index.html: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/index.html: operation not permitted
2021/05/19 06:06:17 ERROR : ice_lego_stopky/ice_lego_stopky_v1/stylesheet.css: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/stylesheet.css: operation not permitted
2021/05/19 06:06:17 ERROR : Test onboarding.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Test onboarding.docx: operation not permitted
2021/05/19 06:06:17 ERROR : Test onboarding.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Test onboarding.docx: operation not permitted
2021/05/19 06:06:17 ERROR : ice_lego_stopky/ice_lego_stopky_v1/script.js: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/script.js: operation not permitted
2021/05/19 06:06:17 ERROR : ice_lego_stopky/ice_lego_stopky_v0/script.js: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/script.js: operation not permitted
2021/05/19 06:06:17 ERROR : ice_lego_stopky/ice_lego_stopky_v0/index.html: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/index.html: operation not permitted
2021/05/19 06:06:17 ERROR : ice_lego_stopky/ice_lego_stopky_v0/stylesheet.css: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/stylesheet.css: operation not permitted
2021/05/19 06:06:17 ERROR : ice_lego_stopky/ice_lego_stopky_v1/graphics/ICE logo.svg: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/graphics/ICE logo.svg: operation not permitted
2021/05/19 06:06:17 ERROR : ice_lego_stopky/ice_lego_stopky_v0/graphics/ICE logo.svg: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/graphics/ICE logo.svg: operation not permitted
2021/05/19 06:06:18 ERROR : TestAleš/Testovací dokument.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/TestAleš/Testovací dokument.docx: operation not permitted
2021/05/19 06:06:18 ERROR : TestAleš/Testovací dokument.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/TestAleš/Testovací dokument.docx: operation not permitted
2021/05/19 06:06:18 ERROR : Hymbajs/GScript/Project folder.xlsx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Hymbajs/GScript/Project folder.xlsx: operation not permitted
2021/05/19 06:06:18 ERROR : Hymbajs/GScript/Project folder.xlsx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Hymbajs/GScript/Project folder.xlsx: operation not permitted
2021/05/19 06:06:22 ERROR : Dominik/Electric_P8_2.2.5.6338.zip: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Dominik/Electric_P8_2.2.5.6338.zip: operation not permitted
2021/05/19 06:06:22 ERROR : Attempt 2/3 failed with 16 errors and: chtimes /media/backdrive/TestovaciDiskFull/Dominik/Electric_P8_2.2.5.6338.zip: operation not permitted
2021/05/19 06:06:22 ERROR : Úprava admin oprávnění.txt: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Úprava admin oprávnění.txt: operation not permitted
2021/05/19 06:06:22 ERROR : Úprava admin oprávnění.bat: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Úprava admin oprávnění.bat: operation not permitted
2021/05/19 06:06:22 ERROR : CrystalDiskInfo8_0_0.exe: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/CrystalDiskInfo8_0_0.exe: operation not permitted
2021/05/19 06:06:22 ERROR : Robotizované pracoviště.png: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Robotizované pracoviště.png: operation not permitted
2021/05/19 06:06:23 ERROR : ice_lego_stopky/ice_lego_stopky_v0/index.html: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/index.html: operation not permitted
2021/05/19 06:06:23 ERROR : ice_lego_stopky/ice_lego_stopky_v0/script.js: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/script.js: operation not permitted
2021/05/19 06:06:23 ERROR : ice_lego_stopky/ice_lego_stopky_v0/stylesheet.css: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/stylesheet.css: operation not permitted
2021/05/19 06:06:23 ERROR : Test onboarding.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Test onboarding.docx: operation not permitted
2021/05/19 06:06:23 ERROR : Test onboarding.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Test onboarding.docx: operation not permitted
2021/05/19 06:06:23 ERROR : ice_lego_stopky/ice_lego_stopky_v1/index.html: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/index.html: operation not permitted
2021/05/19 06:06:23 ERROR : ice_lego_stopky/ice_lego_stopky_v1/stylesheet.css: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/stylesheet.css: operation not permitted
2021/05/19 06:06:23 ERROR : ice_lego_stopky/ice_lego_stopky_v1/script.js: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/script.js: operation not permitted
2021/05/19 06:06:23 ERROR : ice_lego_stopky/ice_lego_stopky_v1/graphics/ICE logo.svg: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v1/graphics/ICE logo.svg: operation not permitted
2021/05/19 06:06:24 ERROR : TestAleš/Testovací dokument.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/TestAleš/Testovací dokument.docx: operation not permitted
2021/05/19 06:06:24 ERROR : TestAleš/Testovací dokument.docx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/TestAleš/Testovací dokument.docx: operation not permitted
2021/05/19 06:06:24 ERROR : ice_lego_stopky/ice_lego_stopky_v0/graphics/ICE logo.svg: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/ice_lego_stopky/ice_lego_stopky_v0/graphics/ICE logo.svg: operation not permitted
2021/05/19 06:06:24 ERROR : Hymbajs/GScript/Project folder.xlsx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Hymbajs/GScript/Project folder.xlsx: operation not permitted
2021/05/19 06:06:24 ERROR : Hymbajs/GScript/Project folder.xlsx: Failed to copy: chtimes /media/backdrive/TestovaciDiskFull/Hymbajs/GScript/Project folder.xlsx: operation not permitted
2021/05/19 06:06:28 ERROR : Dominik/Electric_P8_2.2.5.6338.zip: Failed to set modification time: chtimes /media/backdrive/TestovaciDiskFull/Dominik/Electric_P8_2.2.5.6338.zip: operation not permitted
2021/05/19 06:06:28 ERROR : Attempt 3/3 failed with 16 errors and: chtimes /media/backdrive/TestovaciDiskFull/Dominik/Electric_P8_2.2.5.6338.zip: operation not permitted
2021/05/19 06:06:28 Failed to copy with 16 errors: last error was: chtimes /media/backdrive/TestovaciDiskFull/Hymbajs/GScript/Project folder.xlsx: operation not permitted

Rclone needs to set the modification time of the file to know it doesn't need to download it again and for some reason it does not have permissions to do so.

Aha, the proble was I prepared the source folder in advance on source server. When deleted them and let Rclone create them, now it copy full even incr copies as expected

Thank you

1 Like

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