You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// find the PVC data volume
k3s kubectl get pvc -A | sort -u | awk '{print "\t" $1 "\t" $2 "\t" $4}' | column -t
// check it (volume, not name)
zfs list | grep PVC_VOLUME
// mount it (you need FULL_PVC_PATH when remounting it)
zfs set mountpoint=/temporary/NAME FULL_PVC_PATH
// open / modify what is needed
// remount it
zfs set mountpoint=legacy POOL_NAME/ix-applications/releases/APP-NAME/volumes/VOLUME-NAME
// clean
rmdir /mnt/temporary/NAME
mysql -uroot -p
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES on nextcloud.* to 'username'@'localhost';
FLUSH privileges;
quit;
Create PostgreSQL user and DB for nextcloud
psql -hlocalhost -Upostgres
CREATE USER nextcloud WITH PASSWORD 'password' CREATEDB;
CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UTF8';
ALTER DATABASE nextcloud OWNER TO nextcloud;
GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;
GRANT ALL PRIVILEGES ON SCHEMA public TO nextcloud;
\q
Restore MariaDB
mysql -h [server] -u [username] -p[password] -e "DROP DATABASE nextcloud"
// -e "CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
mysql -h [server] -u [username] -p[password] -e "CREATE DATABASE nextcloud"
mysql -h [server] -u [username] -p[password] [db_name] < nextcloud-sqlbkp.bak