# IO errors when sync needs to delete files

**URL:** <https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401>\
**Category:** Help and Support\
**Created:** [February 20, 2022, 6:30pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401 "2022-02-20T18:30:13Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 6:30pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/1 "2022-02-20T18:30:13Z")

</div>

#### What is the problem you are having with rclone?

I've successfully run an initial backup, but it seems to error out when it needs to delete files from the remote.

#### Run the command 'rclone version' and share the full output of the command.

```auto
rclone v1.57.0
- os/version: Microsoft Windows 10 Pro 2009 (64 bit)
- os/kernel: 10.0.19044.1526 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount

```

#### Which cloud storage system are you using?

Local.

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

```auto
rclone sync e: encryptednas: --bwlimit 100m -P -vv

```

#### The rclone config contents with secrets removed.

```auto
[nasbackup]
type = alias
remote = Z:\Backup\

[encryptednas]
type = crypt
remote = nasbackup:
password = xxxxx

```

#### A log from the command with the `-vv` flag

The log is thousands of lines, this is the error I'm getting after it has finished the sync.

```auto
2022-02-20 18:40:17 DEBUG : Encrypted drive 'encryptednas:': Waiting for checks to finish
2022-02-20 18:40:17 DEBUG : Encrypted drive 'encryptednas:': Waiting for transfers to finish
2022-02-20 18:40:17 ERROR : Encrypted drive 'encryptednas:': not deleting files as there were IO errors
2022-02-20 18:40:17 ERROR : Encrypted drive 'encryptednas:': not deleting directories as there were IO errors
2022-02-20 18:40:17 ERROR : Attempt 3/3 failed with 2 errors and: not deleting files as there were IO errors

2022/02/20 18:40:17 DEBUG : 2 go routines active
2022/02/20 18:40:17 Failed to sync with 2 errors: last error was: not deleting files as there were IO errors

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 6:49pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/2 "2022-02-20T18:49:34Z")

</div>

hi,  
can you post the top 30 lines of the debug log,  
and an example of an individual file with that error.

---

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 7:02pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/3 "2022-02-20T19:02:12Z")

</div>

It does not show what files failed, or it probably does but I can't scroll that far up in the terminal.

All lines in the terminal are like this, with the only changes being file path. These are some of the last lines before it finshes.

```auto
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/basic.py: Size and modification time the same (differ by 0s, within tolerance 100ns)
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/basic.py: Unchanged skipping
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/indirect.py: Size and modification time the same (differ by 0s, within tolerance 100ns)
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/indirect.py: Unchanged skipping
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/basic2.py: Size and modification time the same (differ by 0s, within tolerance 100ns)
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/subpackage.py: Size and modification time the same (differ by 0s, within tolerance 100ns)
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/util.py: Size and modification time the same (differ by 0s, within tolerance 100ns)
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/rebinding2.py: Size and modification time the same (differ by 0s, within tolerance 100ns)
2022-02-20 18:40:04 DEBUG : Programs/Benchmarks/Blender Open Data/blender-benchmark-1.0b2-windows64/blender/2.79/python/lib/test/test_import/data/circular_imports/rebinding.py: Size and modification time the same (differ by 0s, within tolerance 100ns)

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 7:07pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/4 "2022-02-20T19:07:05Z")

</div>

let's use a debug log, instead of spiting output to console.  
`--log-level=DEBUG --log-file=c:\path\to\local\folder\rclone.log

rclone might not output much to the terminal so add  
`--progress`

---

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 8:33pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/5 "2022-02-20T20:33:29Z")

</div>

This is all "ERROR" log entries. The log is well over 100MB:

```auto
2022/02/20 20:57:45 ERROR : System Volume Information: failed to open directory "System Volume Information": open \\?\E:\System Volume Information: Access is denied.

2022/02/20 20:59:42 ERROR : Encrypted drive 'encryptednas:': not deleting files as there were IO errors
2022/02/20 20:59:42 ERROR : Encrypted drive 'encryptednas:': not deleting directories as there were IO errors
2022/02/20 20:59:42 ERROR : Attempt 1/3 failed with 2 errors and: not deleting files as there were IO errors

2022/02/20 20:59:42 ERROR : System Volume Information: failed to open directory "System Volume Information": open \\?\E:\System Volume Information: Access is denied.

2022/02/20 21:01:32 DEBUG : Encrypted drive 'encryptednas:': Waiting for checks to finish
2022/02/20 21:01:32 DEBUG : Encrypted drive 'encryptednas:': Waiting for transfers to finish
2022/02/20 21:01:32 ERROR : Encrypted drive 'encryptednas:': not deleting files as there were IO errors
2022/02/20 21:01:32 ERROR : Encrypted drive 'encryptednas:': not deleting directories as there were IO errors
2022/02/20 21:01:32 ERROR : Attempt 2/3 failed with 2 errors and: not deleting files as there were IO errors

2022/02/20 21:01:32 ERROR : System Volume Information: failed to open directory "System Volume Information": open \\?\E:\System Volume Information: Access is denied.

2022/02/20 21:03:28 DEBUG : Encrypted drive 'encryptednas:': Waiting for checks to finish
2022/02/20 21:03:28 DEBUG : Encrypted drive 'encryptednas:': Waiting for transfers to finish
2022/02/20 21:03:28 ERROR : Encrypted drive 'encryptednas:': not deleting files as there were IO errors
2022/02/20 21:03:28 ERROR : Encrypted drive 'encryptednas:': not deleting directories as there were IO errors
2022/02/20 21:03:28 ERROR : Attempt 3/3 failed with 2 errors and: not deleting files as there were IO errors
2022/02/20 21:03:28 INFO : 
Transferred: 1.422 MiB / 1.422 MiB, 100%, 5.299 KiB/s, ETA 0s
Errors: 2 (retrying may help)
Checks: 344513 / 344513, 100%
Transferred: 1 / 1, 100%
Elapsed time: 5m43.6s

2022/02/20 21:03:28 DEBUG : 2 go routines active
2022/02/20 21:03:28 Failed to sync with 2 errors: last error was: not deleting files as there were IO errors

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 8:37pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/6 "2022-02-20T20:37:38Z")

</div>

> [@apimapper](#):
>
> `failed to open directory "System Volume Information": open \\?\E:\System Volume Information: Access is denied.`

sure, that is to be expected.  
if the username used to run rclone cannot access a file/folder,  
then rclone cannot access the file/folder.  
use an [--exclude](https://rclone.org/filtering/#exclude-exclude-files-matching-pattern) filter

---

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 9:09pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/7 "2022-02-20T21:09:56Z")

</div>

But that isn't my problem. rclone will not delete any files that is deleted from my machine.

It will happily sync new files but won't delete any files again off the remote.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 9:14pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/8 "2022-02-20T21:14:10Z")

</div>

> [@apimapper](#):
>
> But that isn't my problem

well, it is your problem.  
by default, `rclone sync` will not delete files if there are errors.

you can change that using  
[https://rclone.org/docs/#delete-before-during-after](https://rclone.org/docs/#delete-before-during-after)

---

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 9:24pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/9 "2022-02-20T21:24:47Z")

</div>

> **Deleted**
>
> I see. From other file syncing programs I've used the synchronization option would always delete files on the mirrored side so I thought that and no duplication was the features separating _clone_ and _sync_.

Just to be clear, the difference between sync and clone is that sync will delete and not make duplicates, but this didn't happen because of the Sys Vol errors?

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 9:28pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/10 "2022-02-20T21:28:20Z")

</div>

> [@apimapper](#):
>
> difference between sync and clone

no such rclone command as `clone`???  
please define your terms.

---

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 9:29pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/11 "2022-02-20T21:29:05Z")

</div>

I meant copy not clone, sorry.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 9:35pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/12 "2022-02-20T21:35:09Z")

</div>

`rclone copy`  
--- copy files  
--- does not delete files  
--- the dest does not match the source

`rclone sync`  
--- copy files  
--- delete files  
--- the dest does match the source.

---

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 9:37pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/13 "2022-02-20T21:37:21Z")

</div>

Even with the `--delete-after` flag rsync doesn't delete any files for me.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 9:39pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/14 "2022-02-20T21:39:50Z")

</div>

> [@apimapper](#):
>
> doesn't delete any files for me.

well, that is documented in the link i shared.

> [@apimapper](#):
>
> rsync

`rclone`

---

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 10:11pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/15 "2022-02-20T22:11:43Z")

</div>

It still won't delete empty folders as there is IO errors but the files are gone. I can't get --exclude to work for "System Volume Information". Do you happen to know how --exclude works on Windows? There's only examples for Linux.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 10:21pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/16 "2022-02-20T22:21:17Z")

</div>

you need to read the entire webpage, it does explain filtering for windows,

anyhoo, filters can be confusing,  
`--exclude="/System Volume Information/"`

---

<div class="post-metadata">

**Author:** ![apimapper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@apimapper](https://forum.rclone.org/u/apimapper)\
**Post date:** [February 20, 2022, 10:25pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/17 "2022-02-20T22:25:02Z")

</div>

I missed the last /. Thanks.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 20, 2022, 10:30pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/18 "2022-02-20T22:30:51Z")

</div>

rclone filtering is like that scene from the first matrix movie,

Morpheus leaps from building to building.  
Neo tries and falls,  
someone says "everyone falls the first time"  
but in the end, Neo can stop bullets.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [February 23, 2022, 10:31pm UTC](https://forum.rclone.org/t/io-errors-when-sync-needs-to-delete-files/29401/19 "2022-02-23T22:31:07Z")

</div>

Closed on February 23, 2022, 10:31pm UTC

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