mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(dblab-engine): expand notes
This commit is contained in:
@@ -805,7 +805,7 @@
|
||||
| reject('match', '^CREATE ROLE ' + master_username)
|
||||
| reject('match', '.*rdsadmin.*')
|
||||
| reject('match', '^(CREATE|ALTER) ROLE rds_')
|
||||
| map('regex_replace', '(NO)(SUPERUSER|REPLICATION)\s?', '')
|
||||
| map('regex_replace', '(\s+(NO)?(SUPERUSER|REPLICATION))?', '')
|
||||
}}
|
||||
- name: Wait for pending changes to be applied
|
||||
amazon.aws.rds_instance_info:
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
| reject('match', '^CREATE ROLE ' + master_username)
|
||||
| reject('match', '.*rdsadmin.*')
|
||||
| reject('match', '^(CREATE|ALTER) ROLE rds_')
|
||||
| map('regex_replace', '(NO)(SUPERUSER|REPLICATION)\s?', '')
|
||||
| map('regex_replace', '(\s+(NO)?(SUPERUSER|REPLICATION))?', '')
|
||||
}}
|
||||
|
||||
- name: Manipulate numbers
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
dblab --url 'http://dblab.example.org:1234/' --token "$(gopass show -o 'dblab')" …
|
||||
|
||||
# Check logs
|
||||
# Only available from the server hosting the engine
|
||||
docker logs --since '5m' -f 'dblab_server'
|
||||
|
||||
# Reload the configuration
|
||||
# Only available from the server hosting the engine
|
||||
docker exec -it 'dblab_server' kill -SIGHUP '1'
|
||||
|
||||
# Check the running container's version
|
||||
@@ -83,7 +85,7 @@ curl 'https://dblab.example.org:1234/clone/some-clone' -H "Verification-Token: $
|
||||
curl 'https://dblab.example.org:1234/api/clone/some-clone' -H "Verification-Token: $(gopass show -o 'dblab')"
|
||||
|
||||
# Restart clones
|
||||
# Only doable from the instance
|
||||
# Only available from the server hosting the engine
|
||||
docker restart 'dblab_clone_6000'
|
||||
|
||||
# Reset clones
|
||||
@@ -111,7 +113,14 @@ curl -X 'PATCH' 'https://dblab.example.org:1234/api/clone/some-clone' \
|
||||
|
||||
# Delete clones
|
||||
dblab clone destroy 'some-clone'
|
||||
curl -X 'DELETE' 'https://dblab.example.org:1234/api/clone/some-clone' -H "Verification-Token: $(gopass show -o 'dblab')"
|
||||
curl -X 'DELETE' 'https://dblab.example.org:1234/api/clone/some-clone' \
|
||||
-H "Verification-Token: $(gopass show -o 'dblab')"
|
||||
|
||||
# Get admin config in YAML format
|
||||
curl 'https://dblab.example.org:1234/api/admin/config.yaml' -H "Verification-Token: $(gopass show -o 'dblab')"
|
||||
|
||||
# Display the engine's status
|
||||
dblab instance status
|
||||
|
||||
# Display the engine's version
|
||||
dblab instance version
|
||||
|
||||
@@ -56,6 +56,10 @@ ALTER DATABASE reviser SET pgaudit.log TO none;
|
||||
\c sales
|
||||
\connect vendor
|
||||
|
||||
-- Get databases' size
|
||||
SELECT pg_database_size('postgres');
|
||||
SELECT pg_size_pretty(pg_database_size('postgres'));
|
||||
|
||||
|
||||
-- List schemas
|
||||
\dn
|
||||
@@ -91,6 +95,10 @@ CREATE TABLE people (
|
||||
\d+ clients
|
||||
SELECT column_name, data_type, character_maximum_length FROM information_schema.columns WHERE table_name = 'vendors';
|
||||
|
||||
-- Get tables' size
|
||||
SELECT pg_relation_size('vendors');
|
||||
SELECT pg_size_pretty(pg_relation_size('vendors'));
|
||||
|
||||
|
||||
-- Insert data
|
||||
INSERT INTO people(id, first_name, last_name, phone)
|
||||
|
||||
@@ -1,5 +1,63 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
###
|
||||
# Pools
|
||||
# --------------------------------------
|
||||
###
|
||||
|
||||
# List available pools
|
||||
zpool list
|
||||
|
||||
# Show pools' I/O statistics
|
||||
zpool iostat
|
||||
|
||||
# Show pools' configuration and status
|
||||
zpool status
|
||||
|
||||
# List all pools available for import
|
||||
zpool import
|
||||
|
||||
# Import pools
|
||||
zpool import -a
|
||||
zpool import -d
|
||||
zpool import 'vault'
|
||||
zpool import 'tank' -N
|
||||
zpool import 'encrypted_pool_name' -l
|
||||
|
||||
# Get pools' properties
|
||||
zpool get all 'vault'
|
||||
|
||||
# Set pools' properties
|
||||
zpool set 'compression=lz4' 'tank'
|
||||
|
||||
# Get info about pools' features
|
||||
man zpool-features
|
||||
|
||||
# Show the history of all pool's operations
|
||||
zpool history 'tank'
|
||||
|
||||
# Check pools for errors
|
||||
# Very cpu *and* disk intensive
|
||||
zpool scrub 'tank'
|
||||
|
||||
# Export pools
|
||||
# Unmounts *all* filesystems in any given pool
|
||||
zpool export 'vault'
|
||||
zpool export -f 'vault'
|
||||
|
||||
# Destroy pools
|
||||
zpool destroy 'tank'
|
||||
|
||||
# Restore destroyed pools
|
||||
# Pools can only be reimported right after the destroy command has been issued
|
||||
zpool import -D
|
||||
|
||||
# Check pool configuration
|
||||
zdb -C 'vault'
|
||||
|
||||
# Display the predicted effect of enabling deduplication
|
||||
zdb -S 'rpool'
|
||||
|
||||
###
|
||||
# File Systems
|
||||
# --------------------------------------
|
||||
@@ -9,6 +67,23 @@
|
||||
# List available datasets
|
||||
zfs list
|
||||
|
||||
# Automatically mount filesystems
|
||||
# Find a dataset's mountpoint's root path via `zfs get mountpoint 'pool_name'`
|
||||
zfs mount -alv
|
||||
|
||||
# Automatically unmount datasets
|
||||
zfs unmount 'tank/media'
|
||||
|
||||
# Create filesystems
|
||||
zfs create 'tank/docs'
|
||||
zfs create -V '1gb' 'vault/good_memories'
|
||||
|
||||
# List snapshots
|
||||
zfs list -t 'all'
|
||||
zfs list -t 'snapshot,volume,bookmark'
|
||||
|
||||
# Create snapshots
|
||||
zfs snapshot 'vault/good_memories@2024-12-31'
|
||||
|
||||
# Check key parameters are fine
|
||||
zfs get -r checksum,compression,readonly,canmount 'tank'
|
||||
|
||||
Reference in New Issue
Block a user