GUI for CouchPotato isn't loading anymore.

Status
Not open for further replies.

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
This whole issue really makes me want to automate the config and database backups for CP, SR, SAB, and Emby on my FreeNAS box.
 

Steve Brown

Explorer
Joined
May 7, 2015
Messages
80
I already do that for the ones that are a pain to reinstall when a issue crops up. Most of the time its just easier to reinstall and then restore configs/database.

Just FYI I had an issue yesterday with CP where some .py files where missing. I am not sure how that happened but all I did was backup the settings.conf in /dir/to/jails/couchpotato_1/var/db/couchpotato/ then reinstalled and replaced the settings .conf. It didnt backup my wanted list but I dont have to many movies in my wanted so its easy to go take care of later or when I got free time. Also all my settings were good didnt need to reconfigure anything which is all I need.

If it happens again with CP I will post the log files right after it happens.
 

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
...
It didnt backup my wanted list but I dont have to many movies in my wanted so its easy to go take care of later or when I got free time. Also all my settings were good didnt need to reconfigure anything which is all I need.
...

Yes, the settings.conf is all you really need for the basic settings. Losing the database causes you to lose wanted movies, quality profiles, cached images, and media library.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
backup of CP.jpg

I deleted the database file and the GUI works again. It seemed to rescan the existing movies. I made a backup of the database fold before deleting it just in case. Unfortunately I can't remember 2 of the movies in the wanted area. Can I read a file from the backup to see what they were?
 
Last edited:

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
You could restore the old database then follow the instructions on how to use the CP Backup/Restore tool for WANTED: https://couchpota.to/forum/viewtopic.php?t=4070

Then blow away CP again and restore the backup of WANTED list. Seems like a hassle though.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
Eh, same issue we are seeing here. They just need to stop the plugin, delete the /var/db/couchpotato/database directory. Restart and configure as I did in my previous post.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
This whole issue really makes me want to automate the config and database backups for CP, SR, SAB, and Emby on my FreeNAS box.

Is that even possible (easily?)
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Eh, same issue we are seeing here. They just need to stop the plugin, delete the /var/db/couchpotato/database directory. Restart and configure as I did in my previous post.
I REALLY don't want to delete my database, what will I lose in there? I have like 100 movies configured or something and all kinds of very refined and tweaked settings for the application.
Is there a way to either, a) NOT delete the database or b) back it ALL up?
I have a snapshot of my working couchpotato on my drive, I can restore the snapshot, but it quickly kills itself with the update (maybe if I can block external networking somehow?)
 

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
Is that even possible (easily?)

Yes - you can just write a script with a few lines to backup the config files to a directory. If you want this to happen on a schedule then you can create a cron job via the FreeNAS WebGUI to run your script.

I just ran the following commands quickly to backup my data directories for the plugins... have not thrown them into scripts yet and I do not change my configs often so at least I have a backup in case things go awry again.

Code:
cp -r /mnt/tank/jails/sabnzbd_1/var/db/couchpotato/ /mnt/tank/backup/FreeNAS/CouchPotato/

cp -r /mnt/tank/jails/sabnzbd_1/var/db/sickrage/ /mnt/tank/backup/FreeNAS/SickRage/

cp -r /mnt/tank/jails/sabnzbd_1/var/db/sabnzbd/ /mnt/tank/backup/FreeNAS/SABnzbd/

cp -r /mnt/tank/jails/sabnzbd_1/var/db/sabnzbd/ /mnt/tank/backup/FreeNAS/SABnzbd/

cp -r /mnt/tank/jails/emby_1/var/db/emby-server/ /mnt/tank/backup/FreeNAS/Emby/



I could really spend about 30 mins to clean this up and make a backup/restore script. Create a script for scheduled backups. The Emby Server command would also be more beneficial using tar to compress a bit.
 

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
I REALLY don't want to delete my database, what will I lose in there? I have like 100 movies configured or something and all kinds of very refined and tweaked settings for the application.
Is there a way to either, a) NOT delete the database or b) back it ALL up?
I have a snapshot of my working couchpotato on my drive, I can restore the snapshot, but it quickly kills itself with the update (maybe if I can block external networking somehow?)

Deleting the database (/var/db/couchpotato/database/) from your jail would lose the following: WANTED, Quality Profiles, Media Library. The media library is rescanned when you start CP back up for the first time. A new DB is created and your media will be scanned in. The WANTED you can backup and restore using the tool I posted in this thread.

You can easily backup the database by copying:

Code:
cp -r /var/db/couchpotato/database/ /insert/backup/path/here
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
My quality profiles :( man
I want to at least fire up my old version and then screenshot the settings, any idea how I can restore my snapshot and block it from accessing the external internet to update?

Also would I be right in thinking, the suggestion you had a post previous about backing up settings, wouldn't help in this one particular instance? Since the files backed up are the problem?
 

bmcclure937

Contributor
Joined
Jul 13, 2012
Messages
110
I have never restored a snapshot, sorry. If you restore you can turn off autoupdates for CP in the settings.

The database and the config files are separate. The config files contain your settings, which can be a pain to reconfigure. The database contains the other items i mentioned (among other things).
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
What's the exact folder or file I need to delete? I've backed up my movies into a TXT file (93 of them)
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
This fix seems pretty fragile and the CP dev closed the issue on Github and just said "reinstall".

I just did a fresh install but kept my data directory in place. Don't really want to lose my library, wanted list, etc..
great! I'm guessing there's something wrong with FreeNAS user's data-directory caused by the recent update. Hopefully we'll find a proper solution soon.

Between these 2 posts, I'm curious whos "fault" this is? I'd like to think it doesn't happen again. Very frustrating that even with snapshot backups, my install is still hosed, requiring more hours of work fixing it.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Hmm, I wonder if this has to do with CouchPotato changing their update URL.
https://github.com/CouchPotato/CouchPotatoServer/commit/cc98412f9a5554c5c05ff90276febcbc158caf60

I could build an new plugin release using the new URL and see if that solves it for people.

I kept a copy of my old "broken one" in a state ready for me to repair it at any time (rollback snapshot)
But are you saying your fix would fix old peoples broken versions or it would just fix it ongoing (it seems to be working fine to do a fresh install? Mine is)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I kept a copy of my old "broken one" in a state ready for me to repair it at any time (rollback snapshot)
But are you saying your fix would fix old peoples broken versions or it would just fix it ongoing (it seems to be working fine to do a fresh install? Mine is)
I think it would fix people's broken versions. It would replace people's source directories. It seems couchpotato's update process is messing up somewhere when transitioning repo URLs.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I pushed version autoupdate.9_5 to the repo, should be available tomorrow for upgrades or fresh installs (and you can restore your /var/db/couchpotato)
 

samesong

Cadet
Joined
Jan 8, 2015
Messages
8
I pushed version autoupdate.9_5 to the repo, should be available tomorrow for upgrades or fresh installs (and you can restore your /var/db/couchpotato)

Just to confirm, if we are having the black screen issue, applying this update will fix the issue without needing to back up my database?
 
Status
Not open for further replies.
Top