Issues with Restic Snapshot Removal and Pruning

I have a script that automates the backup of a specific folder on my server using Restic, which saves the backups to OneDrive. This workflow has functioned smoothly for the past year. However, in the last few days, I’ve been experiencing issues with Restic when trying to remove and prune snapshots. I would appreciate any guidance on how to resolve this issue.

The script performs the following tasks:

  1. Backups the specified folder.
  2. Removes snapshots (the full command is provided below).
  3. Checks the repository for errors.

OS Information

OS: Debian GNU/Linux 11 (bullseye) aarch64
Kernel: 6.1.31-v8+

Restic Version

restic 0.17.2 compiled with go1.23.2 on linux/arm64

Rclone Version

rclone v1.68.1
- os/version: raspbian 11.11 (64 bit)
- os/kernel: 6.1.31-v8+ (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.23.1
- go/linking: static
- go/tags: none

The Restic command that failed to complete.

restic -r "myrepo" forget \
	--verbose \
	--password-file "secretfile" \
	--tag myrepo \
	--prune \
	--group-by host,tags \
	--keep-daily 8 \
	--keep-weekly 5 \
	--keep-monthly 13 \
	--keep-yearly 4 \
	>> "mylog.log" 2>&1

Errors

[0:00] 100.00%  1 / 1 files deleted
1 snapshots have been removed, running prune
loading indexes...
loading all snapshots...
finding data that is still in use for 23 snapshots
[0:00] 100.00%  23 / 23 snapshots
searching used packs...
collecting packs for deletion and repacking
[0:09] 100.00%  1750 / 1750 packs processed

used:              47677 blobs / 25.729 GiB
unused:             5326 blobs / 1.735 GiB
total:             53003 blobs / 27.464 GiB
unused size: 6.32% of total size

to repack:          1923 blobs / 444.324 MiB
this removes:        763 blobs / 275.512 MiB
to delete:           180 blobs / 115.567 MiB
total prune:         943 blobs / 391.080 MiB
remaining:         52060 blobs / 27.082 GiB
unused size after prune: 1.353 GiB (5.00% of remaining size)

totally used packs:        904
partly used packs:         839
unused packs:                7

to keep:            1714 packs
to repack:            29 packs
to delete:             7 packs
repacking packs
Load(<data/55d725cb28>, 1607840, 9341463) failed: <data/55d725cb28> does not exist
rclone: 2024/11/03 04:02:21 ERROR : data/e5/e5d329df3a921473ebee5beb38edb69b92b02eaa74d7b80a11a565013e1b6034: Didn't finish writing GET request (wrote 3117056/9802011 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/e5d329df3a>, 9802011, 0) returned error, retrying after 914.441421ms: unexpected EOF
rclone: 2024/11/03 04:02:21 NOTICE: data/90/90eefd9753c7ef9e36b41e34450e3bfbfa4d672ac97990fdd3a7bd0f996de730: Failed to cancel multipart upload: unauthenticated: Unauthenticated (upload failed due to: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close)
rclone: 2024/11/03 04:02:21 ERROR : data/90/90eefd9753c7ef9e36b41e34450e3bfbfa4d672ac97990fdd3a7bd0f996de730: Post request put error: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close
rclone: 2024/11/03 04:02:21 ERROR : data/90/90eefd9753c7ef9e36b41e34450e3bfbfa4d672ac97990fdd3a7bd0f996de730: Post request rcat error: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close
Save(<data/90eefd9753>) returned error, retrying after 1.080089364s: unexpected HTTP response (500): 500 Internal Server Error
Load(<data/e5d329df3a>, 9802011, 0) operation successful after 1 retries
rclone: 2024/11/03 04:02:26 ERROR : data/97/976fdcd577e50580698fb315b97e49dd371a66f1cc9f47d679d7f3849b7eaf6b: Didn't finish writing GET request (wrote 282624/4850402 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/976fdcd577>, 4850402, 12319648) returned error, retrying after 1.1560658s: unexpected EOF
Load(<data/47a3f12faa>, 33113, 9759841) failed: <data/47a3f12faa> does not exist
Load(<data/55d725cb28>, 180461, 9952618) failed: <data/55d725cb28> does not exist
Load(<data/55d725cb28>, 180461, 9952618) failed: <data/55d725cb28> does not exist
rclone: 2024/11/03 04:02:26 ERROR : data/e5/e5d329df3a921473ebee5beb38edb69b92b02eaa74d7b80a11a565013e1b6034: Didn't finish writing GET request (wrote 315392/5374892 bytes): http2: stream closed
[0:15] 34.48%  10 / 29 packs repacked
rclone: 2024/11/03 04:02:26 ERROR : data/d6/d6b543eb5df1374945d2f0e802f7e1765f948997e3aeb55434b06d380537aea0: Post request put error: Post "https://graph.microsoft.com/v1.0/drives/80CF088D41A1A034/items/80CF088D41A1A034!20682:/d6b543eb5df1374945d2f0e802f7e1765f948997e3aeb55434b06d380537aea0:/createUploadSession": context canceled
rclone: 2024/11/03 04:02:26 ERROR : data/d6/d6b543eb5df1374945d2f0e802f7e1765f948997e3aeb55434b06d380537aea0: Post request rcat error: Post "https://graph.microsoft.com/v1.0/drives/80CF088D41A1A034/items/80CF088D41A1A034!20682:/d6b543eb5df1374945d2f0e802f7e1765f948997e3aeb55434b06d380537aea0:/createUploadSession": context canceled
rclone: 2024/11/03 04:02:26 NOTICE: data/90/90eefd9753c7ef9e36b41e34450e3bfbfa4d672ac97990fdd3a7bd0f996de730: Failed to cancel multipart upload: Delete "https://my.microsoftpersonalcontent.com/bla bla bla": context canceled (upload failed due to: Put "https://my.microsoftpersonalcontent.com/bla bla bla": context canceled)
rclone: 2024/11/03 04:02:26 ERROR : data/90/90eefd9753c7ef9e36b41e34450e3bfbfa4d672ac97990fdd3a7bd0f996de730: Post request put error: Put "https://my.microsoftpersonalcontent.com/bla bla bla": context canceled
rclone: 2024/11/03 04:02:26 ERROR : data/90/90eefd9753c7ef9e36b41e34450e3bfbfa4d672ac97990fdd3a7bd0f996de730: Post request rcat error: Put "https://my.microsoftpersonalcontent.com/bla bla bla": context canceled
Fatal: StreamPack: ReadFull(<data/55d725cb28>): <data/55d725cb28> does not exist

I ran several commands to identify potential corruption or other issues with the repository stored in OneDrive. Based on the recommendations from the restic check command, I attempted a restic prune. Although the command completed, it returned numerous errors. However, a subsequent restic check showed no errors. I’m still seeking guidance, as I’m concerned about potential data loss

restic -r “myrepo” check --read-data --password-file “secret.file”

restic -r "myrepo" check --read-data --password-file "secret.file"
using temporary cache in /tmp/restic-check-cache-2995416811
create exclusive lock for repository
repository 36ceec1e opened (version 2, compression level auto)
created new cache in /tmp/restic-check-cache-2995416811
load indexes
[0:01] 100.00%  3 / 3 index files loaded
check all packs
2 additional files were found in the repo, which likely contain duplicate data.
This is non-critical, you can run `restic prune` to correct this.
check snapshots, trees and blobs
[0:05] 100.00%  23 / 23 snapshots
read all data
[34:36] 100.00%  1750 / 1750 packs
no errors were found

restic -r “myrepo” prune --password-file “secret.file”

repository 36ceec1e opened (version 2, compression level auto)
loading indexes...
[0:00] 100.00%  3 / 3 index files loaded
loading all snapshots...
finding data that is still in use for 23 snapshots
[0:00] 100.00%  23 / 23 snapshots
searching used packs...
collecting packs for deletion and repacking
[0:08] 100.00%  1750 / 1750 packs processed

to repack:          1923 blobs / 444.324 MiB
this removes:        763 blobs / 275.512 MiB
to delete:           180 blobs / 150.074 MiB
total prune:         943 blobs / 425.586 MiB
remaining:         52060 blobs / 27.082 GiB
unused size after prune: 1.353 GiB (5.00% of remaining size)

deleting unreferenced packs
[0:00] 100.00%  2 / 2 files deleted
repacking packs
rclone: 2024/11/03 06:27:06 ERROR : data/47/479d173faebba35fdd76b9c78dc32d8c0ceb85ff373b66e5a0ecef221aaa0279: Didn't finish writing GET request (wrote 8400896/14767765 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/479d173fae>, 14767765, 0) returned error, retrying after 727.570925ms: unexpected EOF
rclone: 2024/11/03 06:27:06 ERROR : data/47/47a3f12faa6fc17f8d865427f2dfcac0804acd2dba49bc51830354cac020a489: Didn't finish writing GET request (wrote 512000/937867 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/47a3f12faa>, 937867, 0) returned error, retrying after 797.210878ms: unexpected EOF
Load(<data/47a3f12faa>, 937867, 0) operation successful after 1 retries
Load(<data/479d173fae>, 14767765, 0) operation successful after 1 retries
Load(<data/69141b87f2>, 5295667, 1934338) failed: <data/69141b87f2> does not exist
rclone: 2024/11/03 06:27:16 ERROR : data/48/48cd6e2ab9b2edbb57ecfc71e7ed3ee9182b75d50bf31a57b4f0546a9c1320b2: Didn't finish writing GET request (wrote 12288/8963604 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/48cd6e2ab9>, 8963604, 8087262) returned error, retrying after 1.092152595s: unexpected EOF
rclone: 2024/11/03 06:27:16 ERROR : data/f9/f918bbba0c8068a3f6fc8f831ff367180196597176f2e1ef30f9f58a9085e85b: Didn't finish writing GET request (wrote 331776/3118960 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/f918bbba0c>, 3118960, 233976) returned error, retrying after 657.952186ms: unexpected EOF
rclone: 2024/11/03 06:27:16 NOTICE: data/1e/1e3b09fff47ba6c09cd0aa72da1985b55ab5894d3cb7d2f40a9c1e4c879417de: Failed to cancel multipart upload: unauthenticated: Unauthenticated (upload failed due to: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close)
rclone: 2024/11/03 06:27:16 ERROR : data/1e/1e3b09fff47ba6c09cd0aa72da1985b55ab5894d3cb7d2f40a9c1e4c879417de: Post request put error: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close
rclone: 2024/11/03 06:27:16 ERROR : data/1e/1e3b09fff47ba6c09cd0aa72da1985b55ab5894d3cb7d2f40a9c1e4c879417de: Post request rcat error: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close
Save(<data/1e3b09fff4>) returned error, retrying after 1.336366804s: unexpected HTTP response (500): 500 Internal Server Error
Load(<data/f918bbba0c>, 3118960, 233976) failed: <data/f918bbba0c> does not exist
Load(<data/48cd6e2ab9>, 8963604, 8087262) failed: <data/48cd6e2ab9> does not exist
rclone: 2024/11/03 06:27:19 ERROR : data/3e/3ef95d420543a62aeb036d14cf6d3038aec2eacd19aca3f4f7299ddad8742812: Didn't finish writing GET request (wrote 8130560/8747795 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/3ef95d4205>, 8747795, 248910) returned error, retrying after 990.6331ms: unexpected EOF
rclone: 2024/11/03 06:27:19 NOTICE: data/c6/c604653b1a93c1b6967a4fef27fd85b3474370eefc820070055236ae28fab078: Failed to cancel multipart upload: unauthenticated: Unauthenticated (upload failed due to: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close)
rclone: 2024/11/03 06:27:19 ERROR : data/c6/c604653b1a93c1b6967a4fef27fd85b3474370eefc820070055236ae28fab078: Post request put error: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close
rclone: 2024/11/03 06:27:19 ERROR : data/c6/c604653b1a93c1b6967a4fef27fd85b3474370eefc820070055236ae28fab078: Post request rcat error: Put "https://my.microsoftpersonalcontent.com/bla bla bla": http2: client connection force closed via ClientConn.Close
Save(<data/c604653b1a>) returned error, retrying after 629.705899ms: unexpected HTTP response (500): 500 Internal Server Error
Save(<data/1e3b09fff4>) operation successful after 1 retries
rclone: 2024/11/03 06:27:21 ERROR : data/3e/3ef95d420543a62aeb036d14cf6d3038aec2eacd19aca3f4f7299ddad8742812: Didn't finish writing GET request (wrote 1191936/8747795 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/69141b87f2>, 1604871, 2827642) failed: <data/69141b87f2> does not exist
Load(<data/48cd6e2ab9>, 479888, 8087262) failed: <data/48cd6e2ab9> does not exist
Load(<data/48cd6e2ab9>, 479888, 8087262) failed: <data/48cd6e2ab9> does not exist
Load(<data/f918bbba0c>, 831506, 233976) failed: <data/f918bbba0c> does not exist
Load(<data/48cd6e2ab9>, 479888, 8087262) failed: <data/48cd6e2ab9> does not exist
Load(<data/f918bbba0c>, 831506, 233976) failed: <data/f918bbba0c> does not exist
Load(<data/3ef95d4205>, 8747795, 248910) returned error, retrying after 1.66410802s: unexpected EOF
Save(<data/c604653b1a>) operation successful after 1 retries
Load(<data/3ef95d4205>, 8747795, 248910) operation successful after 2 retries
Load(<data/f918bbba0c>, 1047722, 1065482) failed: <data/f918bbba0c> does not exist
rclone: 2024/11/03 06:27:25 ERROR : data/69/69141b87f2789ffaf7f0d84d18dafa1d038f4bdbf38da1620eee506b4ad17d3f: Didn't finish writing GET request (wrote 290816/1604871 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/3ef95d4205>, 4733032, 10296721) failed: <data/3ef95d4205> does not exist
Load(<data/69141b87f2>, 1604871, 2827642) returned error, retrying after 943.876191ms: unexpected EOF
Load(<data/69141b87f2>, 1604871, 2827642) operation successful after 1 retries
[1:11] 100.00%  29 / 29 packs repacked
rebuilding index
[0:05] 100.00%  4 / 4 indexes processed
[0:00] 100.00%  4 / 4 old indexes deleted
removing 36 old packs
[0:01] 100.00%  36 / 36 files deleted
done

restic -r “myrepo” check --password-file “secret.file”

using temporary cache in /tmp/restic-check-cache-658959472
create exclusive lock for repository
repository 36ceec1e opened (version 2, compression level auto)
created new cache in /tmp/restic-check-cache-658959472
load indexes
[0:01] 100.00%  2 / 2 index files loaded
check all packs
check snapshots, trees and blobs
[0:06] 100.00%  23 / 23 snapshots
no errors were found

If prune or check complete successfully, then all temporary errors during the operation could be retried successfully. That means that your backup is fine.

There are a few other OneDrive users in the forum maybe the can chine in regarding the OneDrive errors?

Hi @MichaelEischer, I appreciate your response. Thank you!

I have been experiencing this issue for the past week. The daily backups complete without any errors, but the pruning fails every few days. Even when pruning is successful, the logs typically contain numerous errors similar to those in the log I’ve shared previously, or the one below.

I have two daily backup jobs on two different machines, both using the same OneDrive account but with separate repositories:

  1. Machine 1 → OneDrive Repository 1
  2. Machine 2 → OneDrive Repository 2

I’m experiencing the pruning issue with combination 1 (Machine 1 and Repository 1), but I don’t encounter any errors with combination 2 (Machine 2 and Repository 2). The backups for combination 2 typically involve much smaller files compared to combination 1.

I am quite concerned about this situation and hope someone can offer some guidance.

Restic Check

using temporary cache in /tmp/restic-check-cache-2290592389
create exclusive lock for repository
repository 36ceec1e opened (version 2, compression level auto)
created new cache in /tmp/restic-check-cache-2290592389
load indexes
[0:01] 100.00%  3 / 3 index files loaded
check all packs
2 additional files were found in the repo, which likely contain duplicate data.
This is non-critical, you can run `restic prune` to correct this.
check snapshots, trees and blobs
[0:05] 100.00%  24 / 24 snapshots
no errors were found

Restic Prune

loading indexes...
loading all snapshots...
finding data that is still in use for 24 snapshots
[0:00] 100.00%  24 / 24 snapshots
searching used packs...
collecting packs for deletion and repacking
[0:09] 100.00%  1774 / 1774 packs processed

to repack:          1823 blobs / 567.013 MiB
this removes:        793 blobs / 336.568 MiB
to delete:           891 blobs / 578.479 MiB
total prune:        1684 blobs / 915.047 MiB
remaining:         52694 blobs / 27.074 GiB
unused size after prune: 1.351 GiB (4.99% of remaining size)

deleting unreferenced packs
[0:00] 100.00%  2 / 2 files deleted
repacking packs
rclone: 2024/11/11 13:31:57 ERROR : data/50/50af4ee4094cfff3e336a50ba3e79399f2992817c1216230780650ac2421f34d: Didn't finish writing GET request (wrote 12288/6773008 bytes): http2: client connection force closed via ClientConn.Close
rclone: 2024/11/11 13:31:57 ERROR : data/61/61dc753326b16e4e75e1742c893a11c19ed8f1bef6b38e2bd119026460ed5121: Didn't finish writing GET request (wrote 159744/5204324 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/61dc753326>, 5204324, 11936118) returned error, retrying after 624.554701ms: unexpected EOF
Load(<data/50af4ee409>, 6773008, 3778435) returned error, retrying after 608.262361ms: unexpected EOF
Load(<data/50af4ee409>, 6773008, 3778435) returned error, retrying after 608.262361ms: unexpected EOF
Load(<data/6173fb68ec>, 906303, 1750245) failed: <data/6173fb68ec> does not exist
Load(<data/61dc753326>, 5204324, 11936118) operation successful after 1 retries
Load(<data/50af4ee409>, 6773008, 3778435) operation successful after 1 retries
Load(<data/c23db783b9>, 2073517, 4491129) returned error, retrying after 885.252239ms: unexpected EOF
rclone: 2024/11/11 13:32:05 ERROR : data/c2/c23db783b9f63b02e3bf7eff13ec227997efb03665bdb69cdaacac2aa85eaeef: Didn't finish writing GET request (wrote 528384/2073517 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/c23db783b9>, 2073517, 4491129) operation successful after 1 retries
rclone: 2024/11/11 13:32:12 ERROR : data/c2/c23db783b9f63b02e3bf7eff13ec227997efb03665bdb69cdaacac2aa85eaeef: Didn't finish writing GET request (wrote 12288/7119144 bytes): http2: client connection force closed via ClientConn.Close
rclone: 2024/11/11 13:32:12 ERROR : data/03/030544cd175e8209360d3f8a875017afb0dc3a6a08dd483944a4e3e5c069cfea: Didn't finish writing GET request (wrote 2846720/6140739 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/c23db783b9>, 7119144, 9686222) returned error, retrying after 644.038617ms: unexpected EOF
Load(<data/42ed374cf9>, 2884821, 10670864) failed: <data/42ed374cf9> does not exist
Load(<data/030544cd17>, 6140739, 0) returned error, retrying after 1.407011898s: unexpected EOF
Load(<data/030544cd17>, 6140739, 0) operation successful after 1 retries
Load(<data/c23db783b9>, 7119144, 9686222) operation successful after 1 retries
rclone: 2024/11/11 13:32:19 ERROR : data/03/030544cd175e8209360d3f8a875017afb0dc3a6a08dd483944a4e3e5c069cfea: Didn't finish writing GET request (wrote 307200/2100083 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/42ed374cf9>, 1046606, 12509079) failed: <data/42ed374cf9> does not exist
Load(<data/030544cd17>, 2100083, 14873581) returned error, retrying after 1.014979465s: unexpected EOF
Load(<data/030544cd17>, 2100083, 14873581) operation successful after 1 retries
Load(<data/9455a81121>, 4891373, 8598021) failed: <data/9455a81121> does not exist
Load(<data/9455a81121>, 4891373, 8598021) failed: <data/9455a81121> does not exist
Load(<data/f5c56afc4b>, 53322, 1149011) failed: <data/f5c56afc4b> does not exist
rclone: 2024/11/11 13:32:28 ERROR : data/75/75597c2b13dd321f62f59c4bc0672e74ccdf9445cea831e617342079986a236b: Didn't finish writing GET request (wrote 823296/11616840 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/75597c2b13>, 11616840, 0) returned error, retrying after 1.307220714s: unexpected EOF
Load(<data/75597c2b13>, 11616840, 0) operation successful after 1 retries
Load(<data/562eada3f8>, 7381712, 7100467) returned error, retrying after 949.012887ms: unexpected EOF
rclone: 2024/11/11 13:32:38 ERROR : data/d6/d6bd83e94221d2db7ce4b6c700c54773a4bb2c967e51594a2007be164201ab6c: Didn't finish writing GET request (wrote 12288/3674170 bytes): http2: client connection force closed via ClientConn.Close
rclone: 2024/11/11 13:32:38 ERROR : data/56/562eada3f83b6fb89ddc00bf62562491ccca049eff40fb7f4098b3586f30a480: Didn't finish writing GET request (wrote 331776/7381712 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/d6bd83e942>, 3674170, 7518065) returned error, retrying after 1.038476469s: unexpected EOF
rclone: 2024/11/11 13:32:41 ERROR : data/d6/d6bd83e94221d2db7ce4b6c700c54773a4bb2c967e51594a2007be164201ab6c: Didn't finish writing GET request (wrote 512000/3674170 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/562eada3f8>, 7381712, 7100467) failed: <data/562eada3f8> does not exist
Load(<data/e952f48310>, 8094682, 464096) failed: <data/e952f48310> does not exist
Load(<data/e952f48310>, 8094682, 464096) failed: <data/e952f48310> does not exist
Load(<data/d6bd83e942>, 3674170, 7518065) returned error, retrying after 1.303029104s: unexpected EOF
Load(<data/d6bd83e942>, 3674170, 7518065) failed: <data/d6bd83e942> does not exist
Load(<data/e952f48310>, 527208, 464096) failed: <data/e952f48310> does not exist
Load(<data/e952f48310>, 527208, 464096) failed: <data/e952f48310> does not exist
Load(<data/562eada3f8>, 324505, 7100467) failed: <data/562eada3f8> does not exist
rclone: 2024/11/11 13:32:43 ERROR : data/29/29252e29bb4a8f3dc7991f8bc22f5673456d08339ff5d54a41a5c69ead45dbf4: Didn't finish writing GET request (wrote 823296/4011299 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/29252e29bb>, 4011299, 13004009) returned error, retrying after 849.05582ms: unexpected EOF
Load(<data/29252e29bb>, 4011299, 13004009) operation successful after 1 retries
rclone: 2024/11/11 13:32:50 ERROR : data/56/562eada3f83b6fb89ddc00bf62562491ccca049eff40fb7f4098b3586f30a480: Didn't finish writing GET request (wrote 12288/3605883 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/562eada3f8>, 3605883, 10876296) returned error, retrying after 995.686482ms: unexpected EOF
rclone: 2024/11/11 13:32:50 ERROR : data/e9/e952f48310d954c971d4b05417d7c6cf3cf5115b670a3a29d6a8bc38658ecec1: Didn't finish writing GET request (wrote 2047494/7034492 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/d6bd83e942>, 4780741, 12471869) failed: <data/d6bd83e942> does not exist
Load(<data/e952f48310>, 7034492, 991304) returned error, retrying after 922.162843ms: unexpected EOF
rclone: 2024/11/11 13:32:50 ERROR : data/69/698cfbb3adb8ff7df764b277282a353759f59a1b9cad5289cbd2d415d54455be: Didn't finish writing GET request (wrote 5868913/6514148 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/698cfbb3ad>, 6514148, 79731) returned error, retrying after 847.076762ms: unexpected EOF
Load(<data/698cfbb3ad>, 6514148, 79731) operation successful after 1 retries
Load(<data/e952f48310>, 7034492, 991304) operation successful after 1 retries
Load(<data/562eada3f8>, 3605883, 10876296) operation successful after 1 retries
rclone: 2024/11/11 13:32:58 ERROR : data/e9/e952f48310d954c971d4b05417d7c6cf3cf5115b670a3a29d6a8bc38658ecec1: Didn't finish writing GET request (wrote 12288/191378 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/3ab4484a94>, 965327, 10330209) failed: <data/3ab4484a94> does not exist
Load(<data/3ab4484a94>, 965327, 10330209) failed: <data/3ab4484a94> does not exist
Load(<data/e952f48310>, 191378, 8367400) returned error, retrying after 1.487290395s: unexpected EOF
Load(<data/e952f48310>, 191378, 8367400) returned error, retrying after 1.487290395s: unexpected EOF
Load(<data/d6bd83e942>, 1092644, 16159966) failed: <data/d6bd83e942> does not exist
rclone: 2024/11/11 13:32:58 ERROR : data/ba/baa1fb4e08274b3054953c97fd9d7ab8f50839b044524e5dbb9d0dcfa439aa39: Didn't finish writing GET request (wrote 233472/1976199 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/baa1fb4e08>, 1976199, 3533818) returned error, retrying after 1.144809041s: unexpected EOF
Load(<data/baa1fb4e08>, 1976199, 3533818) operation successful after 1 retries
Load(<data/e952f48310>, 191378, 8367400) operation successful after 1 retries
rclone: 2024/11/11 13:33:08 ERROR : data/bc/bc34783e0e43a5f411ddc1f34e470b4b38319b0ac94c88563c3ec86a0c3b867f: Didn't finish writing GET request (wrote 12288/896471 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/bc34783e0e>, 896471, 4071824) returned error, retrying after 657.630035ms: unexpected EOF
rclone: 2024/11/11 13:33:08 ERROR : data/e9/e952f48310d954c971d4b05417d7c6cf3cf5115b670a3a29d6a8bc38658ecec1: Didn't finish writing GET request (wrote 503808/869271 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/e952f48310>, 869271, 14165550) returned error, retrying after 1.155246257s: unexpected EOF
Load(<data/bc34783e0e>, 896471, 4071824) operation successful after 1 retries
Load(<data/e952f48310>, 869271, 14165550) operation successful after 1 retries
rclone: 2024/11/11 13:33:20 ERROR : data/bd/bdece506ee5ae9f26551117ea8b4f4f98117b47e352cf8edb675131a2368382d: Didn't finish writing GET request (wrote 12288/3861759 bytes): http2: client connection force closed via ClientConn.Close
rclone: 2024/11/11 13:33:20 ERROR : data/0d/0deae4a66ba442bc3febd5f18bd1107eb72fa21be19ed390b30dad889a45b5f0: Didn't finish writing GET request (wrote 421888/973829 bytes): http2: client connection force closed via ClientConn.Close
Load(<data/bdece506ee>, 3861759, 9689184) returned error, retrying after 1.013419266s: unexpected EOF
Load(<data/bdece506ee>, 3861759, 9689184) returned error, retrying after 1.013419266s: unexpected EOF
Load(<data/0deae4a66b>, 973829, 10619596) returned error, retrying after 687.903683ms: unexpected EOF
Load(<data/0deae4a66b>, 973829, 10619596) operation successful after 1 retries
Load(<data/bdece506ee>, 3861759, 9689184) operation successful after 1 retries
[1:43] 100.00%  35 / 35 packs repacked
rebuilding index
[0:03] 100.00%  4 / 4 indexes processed
[0:00] 100.00%  4 / 4 old indexes deleted
removing 68 old packs
[0:02] 100.00%  68 / 68 files deleted
done

Restic Check

using temporary cache in /tmp/restic-check-cache-2919109597
create exclusive lock for repository
repository 36ceec1e opened (version 2, compression level auto)
created new cache in /tmp/restic-check-cache-2919109597
load indexes
[0:01] 100.00%  2 / 2 index files loaded
check all packs
check snapshots, trees and blobs
[0:04] 100.00%  24 / 24 snapshots
no errors were found

OneDrive is known for heavy throttling from time to time. As many similar cheap consumer level services it is provided pretty much on best effort basis without any formal SLA. Still there are some configuration steps to at least try to make it bearable.

What is your onedrive rclone configuration? Run rclone config redacted and post output here.

Hi @kapitainsky, please find the rclone configuration below.

[onedrive02]
type = onedrive
client_id = XXX
client_secret = XXX
token = XXX
drive_id = XXX
drive_type = personal
### Double check the config for sensitive info before posting publicly

Looks good but you can also add:

delta = true

to enable –fast-list

What I have noticed when using OneDrive is that sometimes to make prune work I have to limit amount of data pruned - use --max-repack-size flag and experiment what works (–max-repack-size 200M ??)

Given above try also to disable HTTP2. You can either pass extra flags via restic - restic -o rclone.args="--disable-http2" or set environment variables - RCLONE_DISABLE_HTTP2 = "TRUE"

Other settings you can try (below values I used for some problematic OneDrive account):

RCLONE_TPSLIMIT = "20"
RCLONE_TPSLIMIT_BURST = "0"
RCLONE_TRANSFERS = "2"
RCLONE_CHECKERS = "4"
RCLONE_RETRIES = "6"
RCLONE_RETRIES_SLEEP = "30s"
RCLONE_DISABLE_HTTP2 = "TRUE"
RCLONE_ONEDRIVE_DELTA = "TRUE"

Overall you want to slow down API calls made by restic to avoid throttling.

Try also the latest rclone beta v1.69 (should be released soon) - it contains some onedrive API fixes.

1 Like

Hi @kapitainsky

Thanks for the hints! I really appreciate your assistance.

-o rclone.args="serve restic --stdio --disable-http2

Adding this flag immediately fixed the http2: client connection force closed via ClientConn.Close issue.

prune --max-repack-size 200M

This flag solved the problem with pruning.

I haven’t experienced any issues with the backup over the past few weeks.

I tried this, but it noticeably slows down the backup job as well as other Restic operations.

1 Like

Glad that it works better now.

Yes it can go either way - see docs for details. For me it speeds up things big time. But I use OneDrive exclusively for one restic repo. If you have multiple repos or other stuff then results can be very different.