1.9 KiB
1.9 KiB
Database
postgres
- Host: postgres
$ create-postgres-user-and-database foo bar # create user `foo` and give him access to database `bar`
Administration shell:
$ sudo psql -h postgres -U postgres
psql> \l # list databases
psql> \c <database> # connect to database
psql> \d # show tables
$ sudo pg_dump -h postgres -U postgres <dbname> > dump.sql # backup
$ sudo psql -h postgres -U postgres < dump.sql # restore
mysql
- Host: mysql
$ create-mysql-user-and-database foo # create database and user `foo`
List zfs snapshots
$ cd /data/containers/<name>/rootfs/.zfs # .zfs directory is hidden and will not be shown by `ls -a`
$ ls
Ldap
Administration: https://ldap.higgsboson.tk
objectclass | description |
---|---|
mailaccount | access imap/smtp |
owncloud | https://cloud.higgsboson.tk |
gitlab | https://git.higgsboson.tk |
ttrss | https://rss.higgsboson.tk |
jabber | xmpp |
Key | Value |
---|---|
Imap | imap.higgsboson.tk, Port 143 |
Smtp | smtp.higgsboson.tk, Port 567 |
Sieve | imap.higgsboson.tk, Port 4190 |
Webmail | https://mail.higgsboson.tk |
Encryption | STARTTLS or TLS |
MX-Record | mail.higgsboson.tk |
SRV-Record | v=spf1 a:mail.higgsboson.tk ip6:2a01:4f8:210:31fd:1::10 -all |
LXC
$ lxc-attach -n <name> # login
$ systemctl start lxc@<name> # start container
$ systemctl stop lxc@<name> # stop container
Get logs
lxc-log <CONTAINER> <SERVICE>
example:
$ lxc-log mail postfix # get logs of postfix service in the mail container
$ lxc-log mail postfix -f # Additional parameter are passed to journalctl