From 5557a7749f70fa235581543a982b3d5ffe14bef1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 30 Sep 2022 20:56:55 +0000 Subject: [PATCH] --- docs/docs/howto.md | 45 ++++++++++++++------------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/docs/docs/howto.md b/docs/docs/howto.md index 5c65fbc..3c677e8 100644 --- a/docs/docs/howto.md +++ b/docs/docs/howto.md @@ -46,31 +46,19 @@ tail -f /var/log/nginx/error.log tail -f /var/log/nginx/access.log ``` -USEFUL COMMANDS +## Dotnet runtimes -Get NGINX version from containerized nginx: -docker container exec -it \[container-id\] nginx -v +### Remove old -SUDO -> ROOT for session -sudo -i -(use exit to go back to john account) - -Connect shell to running container: -docker exec -it \[container-id\] bash (or ash on alpine) - -CERTBOT DRY RUN -append --dry-run to command - -BACKUP FOLDERS AND FILES -cp -R pecklist pecklist_backup - -REMOVE OLD .NET RUNTIMES: Some of these commands get the job done + +```bash cd /usr/share/dotnet/shared apt-cache pkgnames Microsoft\* apt-cache pkgnames apt list --installed apt-get remove dotnet-runtime-3.0 +``` ## APT package manager @@ -92,8 +80,10 @@ cat /var/run/reboot-required ### Uninstall and purge package +```bash sudo apt-get --purge remove package_name apt-get autoremove +``` ## SPACES BACKUP @@ -128,7 +118,10 @@ nano /etc/systemd/system/ayanova.service Commands must be terminated with a semicolon or it will wait until it sees one Open sql console as postgres admin user: + +```bash sudo -u postgres psql +``` #### Restore AyaNova from backup @@ -145,23 +138,13 @@ sudo -u postgres psql #### List all dbs -`\l` +```sql +\l +``` #### Get disk size of db -In bytes: -`select pg_database_size('AyaNova');` - -Prettified to human readable sizes: - -```sql -SELECT - pg_size_pretty ( - pg_database_size ('AyaNova') - ); -``` - -Display the size of _all_ databases in human readable format +_All_ databases in human readable format ```sql SELECT