[Plugin] CA Cleanup Appdata


Squid

Recommended Posts

A plugin designed to scan your docker appdata share for folders that are no longer used by Docker applications and prompt you if you would like them deleted.

 

Formerly part of Community Applications, this module is now packaged separately.

 

This plugin will automatically be installed with new installs of CA, but is now able to be uninstalled separately from CA, or installed separately (if CA is not installed)

 

 

 

To install this plugin separately, either go to CA's CA Modules section and install it from there.

 

If for some reason, you do not have CA installed on your system, then paste the following url into the Install Plugins section:

 

https://raw.githubusercontent.com/Squidly271/ca.cleanup.appdata/master/plugins/ca.cleanup.appdata.plg
Note: This plugin is deprecated.  While it is 100% fully functional, I got tired of being blamed every time somebody massively misconfigured an app, then ran the plugin and answered all the questions without even thinking for a second.
Edited by Squid
  • Thanks 2
  • Upvote 2
Link to comment
  • 3 months later...

Hi Squid,

Came across a small issue I can't seem to resolve.

 

The plugin wants to clean "Maria-WebSQL: /mnt/user/appdata/", because I went back and forth between Maria-WebSQL and just MariaDB, however that folder/path does not exist; yet the plugin continues to want to clean it.  

 

How/Where might it be detecting this path when it is not on the filesystem? 

root@UNRAID:/mnt/user/appdata# ls -a


./  ../  LibreELEC/  mariadb/
root@UNRAID:/mnt/user/appdata#

 

Is it confusing mariadb with mariadb-websql because/if/maybe my mariadb-websql docker was named mariadb? 

 

Is there another place where that symbolic name would be referenced that I can edit?

 

Thank you ;)

Link to comment
  • 1 month later...

Hi @Squid,

 

 

This was working well for me until today when I encountered the following:
 

Warning: DOMDocument::loadXML(): Empty string supplied as input in /usr/local/emhttp/plugins/ca.cleanup.appdata/include/xmlHelpers.php on line 195 Fatal error: Uncaught Exception: [XML2Array] Error parsing the XML string. in /usr/local/emhttp/plugins/ca.cleanup.appdata/include/xmlHelpers.php:197 Stack trace: #0 /usr/local/emhttp/plugins/ca.cleanup.appdata/include/exec.php(43): XML2Array::createArray('') #1 /usr/local/src/wrap_post.php(27): include('/usr/local/emht...') #2 {main} thrown in /usr/local/emhttp/plugins/ca.cleanup.appdata/include/xmlHelpers.php on line 197

Any help is appreciated as I can't currently easily clean up, this plugin was working too well ;p

EDIT: Actually digging deeper, I'm getting similar issues even trying to add new applications. I can search but when I go to install it throws a similar error message.

Edited by firrae
Link to comment
  • 6 months later...

Hey

 

I have a question. I have just removed a docker that was linked to another docker (they shared one common folder). Now the script lists the other dockers folder. How can I exclude it.

I did restart the docker in the hopes that it would leave it alone but it doesn't do that.

 

Cheers 

Link to comment
8 hours ago, gxs said:

Hey

 

I have a question. I have just removed a docker that was linked to another docker (they shared one common folder). Now the script lists the other dockers folder. How can I exclude it.

I did restart the docker in the hopes that it would leave it alone but it doesn't do that.

 

Cheers 

Don't check it off.

 

But, if it's posting up that its suggesting to delete it, then the other container that's also referencing it isn't installed.  Unless you've found an issue, in which case post up some screen shots so I can see what's happening.

Link to comment

Hi....

 

Moved to 6.5.0 and now when running this app it tosses the below at me.  I uninstalled and reinstalled and received the same error.

 

Plugin Version: 2017.11.23

 

Fatal error: Uncaught Exception: [XML2Array] Error parsing the XML string. in /usr/local/emhttp/plugins/ca.cleanup.appdata/include/xmlHelpers.php:197 Stack trace: #0 /usr/local/emhttp/plugins/ca.cleanup.appdata/include/exec.php(43): XML2Array::createArray('\x00\x05\x16\x07\x00\x02\x00\x00Mac OS ...') #1 {main} thrown in /usr/local/emhttp/plugins/ca.cleanup.appdata/include/xmlHelpers.php on line 197

 

 

Edited by David Bott
Link to comment

ok, i was the stupid one, but this plug-in really ****** me over tonight.

listed few old dockers which i didn't use for a while

 

binhex-sonarr 

etc

 

but it was pointing to the linxserver-sonarr folder (i guess the old binhex docker used the same one I use currently)

now my 'prod' sonarr is GONE.

 

ofc it's my fault, but why did it list a folder, if it belonds to az in use application?.............

:SIGH:

  • Like 1
Link to comment
  • 1 month later...
11 minutes ago, Squid said:

Nope.  It goes through your installed / previously installed apps, determines what's not referenced any more by an installed app, and offers it up to delete.  That's why there's the double confirmation before it does anything.

 

So, what failed here? Clearly the data was being used (still is).

Link to comment
  • 10 months later...
ca.cleanup.appdata.plg

This plugin has been deprecate and should no longer be used due to the following reason(s): Because this plugin has the ability to delete your entire array in the case of a severely misconfigured docker application, it is now deprecated in favour of manually deleting the appdata folders via Krusader and the like. While this plugin should still be functional, it is no recommended to continue to use it.

What happened to this plugin?

Link to comment
3 hours ago, remati said:

ca.cleanup.appdata.plg

This plugin has been deprecate and should no longer be used due to the following reason(s): Because this plugin has the ability to delete your entire array in the case of a severely misconfigured docker application, it is now deprecated in favour of manually deleting the appdata folders via Krusader and the like. While this plugin should still be functional, it is no recommended to continue to use it.

What happened to this plugin?

I got tired of being blamed everytime someone massively misconfigured a container, then checked off their share, confirmed the request, and watched their media go bye-bye.  If you've never done that, then there's nothing stopping you from carrying on using the plugin.

  • Upvote 1
Link to comment
23 hours ago, Squid said:

I got tired of being blamed everytime someone massively misconfigured a container, then checked off their share, confirmed the request, and watched their media go bye-bye.  If you've never done that, then there's nothing stopping you from carrying on using the plugin.

This tool has been pretty useful to me so I'll continue to use it.  Thanks for your efforts with keeping it updated and always useful.

 

Question: Would it be possible to modify it so that even after doing all those steps, detect/determine if the action is going to delete the entire array (or just do something very bad) and display a severe warning and have to explicitly allow the action?

 

Might it be as easy as checking the path selected for deleting and making sure the path is a a folder and not the whole share?  

Edited by Energen
Link to comment
This tool has been pretty useful to me so I'll continue to use it.  Thanks for your efforts with keeping it updated and always useful.
 
Question: Would it be possible to modify it so that even after doing all those steps, detect/determine if the action is going to delete the entire array (or just do something very bad) and display a severe warning and have to explicitly allow the action?
 
Might it be as easy as checking the path selected for deleting and making sure the path is a a folder and not the whole share?  
Thereal heinous paths like mnt and mnt/user are already excluded

Sent via telekinesis

Link to comment
  • 2 months later...

Does anyone know why this is happening?

Fatal error: Uncaught Exception: [XML2Array] Error parsing the XML string. in /usr/local/emhttp/plugins/ca.cleanup.appdata/include/xmlHelpers.php:197 Stack trace: #0 /usr/local/emhttp/plugins/ca.cleanup.appdata/include/exec.php(42): XML2Array::createArray('\x81m\xC2\x9C\x06\x1C\xC9\xADL\xBC\x02\x00k\xC5\xEA...') #1 {main} thrown in /usr/local/emhttp/plugins/ca.cleanup.appdata/include/xmlHelpers.php on line 197

I installed and reinstalled a few times already. It was working for me before with no issues. Running on unRaid 6.6.7 Any help would be appreciated.

Link to comment

Because over time, the docker system and CA (the only other 2 pieces of software that look at that folder) have been updated over time to ignore any corrupted files.  This plugin hasn't.  

 

I'd open each of them and see if there's any obvious problems and then delete it.  If I think about it, I may update the plugin on the weekend, even though it is deprecated

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.