Monthly Archives: January 2024

Uncategorized

NextCould – Locked Admin Account

Somehow managed to lock myself out of the next cloud admin account. If you have proper access it can be reset with the following:

sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin
Open Source

Lychee > Piwigo – Transfer

So I had been using Piwigo for a while but when I tried to upgrade PHP it blew up the instance. So I started looking around for something else that would support PHP 8+ and drifted into the docker/podman world, and the first container I got working in production happened to be Lychee which is a neat little photo management software but, there is some major lack on Lychee, no user management, no size selection when viewing, no method of putting in a photo description. Then Piwigo version 14 drops and it fixes a lot of the issues that Lychee has and adds some pretty cool functionality so now I’m trying to migrate back to Piwigo, here is the script I’m using to pull out the info for transfer.

--SELECT * FROM photos WHERE album_id = 'qVnjGzkaw25SvFRPek3TpULO'

SELECT 
'move ".\' || replace(sv.short_path, '/', '\') || '" ".\breakout\' || replace(a.title, '/', '-') || '\' || p.title || '.jpg"' as oFileName
FROM size_variants sv
JOIN photos p on (sv.photo_id = p.id)
JOIN base_albums a on (p.album_id = a.id)
WHERE sv.short_path like 'original%'
AND p.album_id != 'qVnjGzkaw25SvFRPek3TpULO'

SELECT 'mkdir "' || replace(a.title, '/', '-') || '"' FROM base_albums

SELECT * 
FROM size_variants sv
JOIN photos p on (sv.photo_id = p.id)
JOIN base_albums a on (p.album_id = a.id)
WHERE sv.short_path like 'original%'