# Deleted outdated sensors / lights recovered after restoring backup

**URL:** <https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902>\
**Category:** General\
**Created:** [May 26, 2024, 8:12pm UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902 "2024-05-26T20:12:10Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![Mimiix](https://forum.phoscon.de/user_avatar/forum.phoscon.de/mimiix/32/10_2.png) [@Mimiix](https://forum.phoscon.de/u/Mimiix)\
**Post date:** [May 31, 2024, 6:11pm UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/21 "2024-05-31T18:11:22Z")

</div>

[@de\_employees](https://forum.phoscon.de/groups/de_employees)

---

<div class="post-metadata">

**Author:** ![dvbcheck](https://forum.phoscon.de/user_avatar/forum.phoscon.de/dvbcheck/32/4238_2.png) [@dvbcheck](https://forum.phoscon.de/u/dvbcheck)\
**Post date:** [May 31, 2024, 6:19pm UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/22 "2024-05-31T18:19:01Z")

</div>

No, these lights and sensors are not active but still remain in Phoscon.  
They are greyed out.  
But HomeBridge put these unusable devices forward to HomeKit.

---

<div class="post-metadata">

**Author:** ![dvbcheck](https://forum.phoscon.de/user_avatar/forum.phoscon.de/dvbcheck/32/4238_2.png) [@dvbcheck](https://forum.phoscon.de/u/dvbcheck)\
**Post date:** [June 1, 2024, 5:57am UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/23 "2024-06-01T05:57:29Z")

</div>

I have installed deCONZ 2.27.2 on my MBAir M3 (macOS 14.5), attached the Conbee III and recovered my backup.

I delete several sensors and lights.

After quitting and starting the app deCONZ, I can start Phoscon from there.

But than, the formerly delete items still appear.

It must have something to do with importing backups / zll.db.  
Here are some sensors formerly delete and still in Phoscon.

 ![Bildschirmfoto 2024-06-01 um 07.55.56](https://forum.phoscon.de/uploads/default/original/2X/b/b1177293bd74f1a64fc0cb498b8c2da0eb2c094b.png)

---

<div class="post-metadata">

**Author:** ![dvbcheck](https://forum.phoscon.de/user_avatar/forum.phoscon.de/dvbcheck/32/4238_2.png) [@dvbcheck](https://forum.phoscon.de/u/dvbcheck)\
**Post date:** [June 1, 2024, 6:57am UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/24 "2024-06-01T06:57:51Z")

</div>

Now I installed deCONZ 2.27.2 on Windows 11 (BootCamp Partition) with the same Conbee III.  
I replaced the zll.db, started Phoscon, all used or formerly deleted device still present.

Then I delete unused sensors, devices. Exported a backup and copied the actual zll.db from this Windows Installation to my SD Card for the Pi4.  
Booting up and all formerly devices are still there??

It must have something to do with the database zll.db.

Here´s the file:

> **[iCloud Drive - Apple iCloud](https://www.icloud.com/iclouddrive/02ayDVhZUrK7M1ylfiwZcL4MA#zll)**
>
> Store, organize and collaborate on files and folders with iCloud Drive. Easily upload, delete or recover files. Changes will sync across your devices with iCloud.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [June 1, 2024, 10:03am UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/25 "2024-06-01T10:03:41Z")

</div>

Just to be sure, you (try to) delete device in phoscon ? not deconz ?  
Do you still have disconnection on others host ?

And yes, I have checked your database integrity, it have fail, but how to restore it … You haven’t an old backup ?

---

<div class="post-metadata">

**Author:** ![dvbcheck](https://forum.phoscon.de/user_avatar/forum.phoscon.de/dvbcheck/32/4238_2.png) [@dvbcheck](https://forum.phoscon.de/u/dvbcheck)\
**Post date:** [June 1, 2024, 2:14pm UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/26 "2024-06-01T14:14:38Z")

</div>

Hello Smanar,

I ´ve deleted the devices within Phoscon.  
I can control the other devices without any problem.  
No old backup from phoscon.

Ho can I check disconnections on macOS or Windows?

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [June 1, 2024, 4:45pm UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/27 "2024-06-01T16:45:58Z")

</div>

> [@dvbcheck](#):
>
> Ho can I check disconnections on macOS or Windows?

With log, and easier as you will have the complete application to see them, in deconz/help/debug view.

---

<div class="post-metadata">

**Author:** ![dvbcheck](https://forum.phoscon.de/user_avatar/forum.phoscon.de/dvbcheck/32/4238_2.png) [@dvbcheck](https://forum.phoscon.de/u/dvbcheck)\
**Post date:** [June 1, 2024, 7:23pm UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/28 "2024-06-01T19:23:37Z")

</div>

Here is the deCONZ log from my MacBook Air M2 14.5 with Conbee III connected via multiport adapter.

> **[deCONZ Help View - Pastebin.com](https://pastebin.com/qAfuaRvz)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [June 2, 2024, 9:36am UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/29 "2024-06-02T09:36:16Z")

</div>

Lot of error but no USB disconnection.  
No one know the SQL request to repair a corrupted database ? Even with data loose.

Have found that, but not the same corruption [Database corruption - 10000s of duplicate sensors in the sensors table · Issue #3972 · dresden-elektronik/deconz-rest-plugin · GitHub](https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3972#issuecomment-2007683846)

---

<div class="post-metadata">

**Author:** ![dvbcheck](https://forum.phoscon.de/user_avatar/forum.phoscon.de/dvbcheck/32/4238_2.png) [@dvbcheck](https://forum.phoscon.de/u/dvbcheck)\
**Post date:** [June 2, 2024, 10:14am UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/30 "2024-06-02T10:14:15Z")

</div>

I´ve found an older phoscon backup and give it a try.

---

<div class="post-metadata">

**Author:** ![dvbcheck](https://forum.phoscon.de/user_avatar/forum.phoscon.de/dvbcheck/32/4238_2.png) [@dvbcheck](https://forum.phoscon.de/u/dvbcheck)\
**Post date:** [June 2, 2024, 3:31pm UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/31 "2024-06-02T15:31:01Z")

</div>

With the 3 month old backup everything feels ok, I can delete sensors, lights and restart and no deleted items appear any more.  
Thanks for the help.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [June 2, 2024, 5:13pm UTC](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902/32 "2024-06-02T17:13:54Z")

</div>

Sorry, I don’t know SQL enought to help you to restore the actual one.  
And about the disconnection with this old backup ?

[Previous page](https://forum.phoscon.de/t/deleted-outdated-sensors-lights-recovered-after-restoring-backup/4902.md?page=1)
