Hallo,
I’m making a backup of Google Drive and each time I run a backup,
the Google Doc files are seen as having being changed because they have a size of 0.
Why ? Because
- Google Doc files are generated each time to a Microsoft format because Google does not allow a export in the native format
- Restic seems to do a hash of the content when the size is not available.
Is it then possible to not take into account the size 0 in change detection ?
Thanks
More info on my search and analyse
No option to ignore the size
I took a look to the backup command but I just see 2 ignore option
restic backup --help | grep '\-ignore*'
--ignore-ctime ignore ctime changes when checking for modified files
--ignore-inode ignore inode number and ctime changes when checking for modified files
A restic Dry Run shows 140Mb of change files that are not
using parent snapshot de70ef70
Files: 0 new, 474 changed, 40488 unmodified
Dirs: 0 new, 858 changed, 0 unmodified
Would add to the repository: 141.029 MiB (121.139 MiB stored)
processed 40962 files, 105.019 GiB in 10:16
Size as seen on a Rclone Mount
For instance, the Runway
GoogleSheet document is seen with a size of 0
ls -il --block-size=1 --time=ctime /gdrive/Bytle/Run*
9810106213172999484 -rw-r--r-- 1 admin admin 0 May 8 2023 /gdrive/Bytle/Runway.xlsx
A Restic diff shows the content change
When I make a diff, I can see that restic
see this file as if the content was changed for each snaphost
restic diff 2b1be0e5 2db48a07
repository 73f0f065 opened (repository version 2) successfully, password is correct
comparing snapshot 2b1be0e5 to 2db48a07:
M /gdrive/Bytle/Runway.xlsx
Files: 0 new, 0 removed, ` changed
Dirs: 0 new, 0 removed
Others: 0 new, 0 removed
Data Blobs: 1 new, 1 removed
Tree Blobs: 1 new, 1 removed
Added: 271.871 KiB
Removed: 271.856 KiB
Md5 shows the content change
And yes, the md5 is not the same because the files are generated
md5sum /tmp/Run*
cd5bcefef3c0e66f3af0ec766da6a66b /tmp/Runway-2.xlsx
795ed87a53687ffee7920ec81e97a741 /tmp/Runway.xlsx