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:
- Backups the specified folder.
- Removes snapshots (the full command is provided below).
- 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