From 1e2f937cb56a964321e0d8f05f6bf52aa553096e Mon Sep 17 00:00:00 2001 From: yo Date: Sun, 22 Sep 2024 19:39:42 +0200 Subject: [PATCH] Update README --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 3030834..2d1d7b7 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Create basejail. A basejail is a jail based on a release: system will be nullfs List jails ---------- -
gocage list
+
gocage list
### Specify fields to display @@ -61,7 +61,7 @@ Just add name on gocage list command : +-----+---------+-----------------+-----------------------+---------+ | 41 | srv-web | 13.0-RELEASE-p4 | vnet0|192.168.1.26/24 | true | +-----+---------+-----------------+-----------------------+---------+ -
+
### By field value You can filter jails with -f option, followed by key=value. Suppose you want to see only active at boot jails: @@ -77,7 +77,7 @@ You can filter jails with -f option, followed by key=value. Suppose you want to +-----+----------+---------+-------------+----------------+ | 22 | srv-dns1 | true | 1 | | +-----+----------+---------+-------------+----------------+ - + Now, only active at boot and running :
gocage list -f Config.Boot=1,Running=true -o JID,Name,Running,Config.Boot
@@ -90,7 +90,7 @@ Now, only active at boot and running :
 +-----+----------+---------+-------------+
 | 22  | srv-dns1 | true    | 1           |
 +-----+----------+---------+-------------+
-
+ Sort jails ---------- @@ -105,7 +105,7 @@ Use -s switch followed by sort criteria. Criteria is a field name, prefixed with +-----+----------+---------+-------------+ | 183 | test | true | 1 | +-----+----------+---------+-------------+ - + You can use up to 3 criteria, delimited with comma. As an example, you want to list boot priorities of automatically starting jails: @@ -121,27 +121,27 @@ As an example, you want to list boot priorities of automatically starting jails: +-----+--------------+-----------------------+-----------------+-------------+---------+ | 4 | coincoin | vnet0|192.168.1.9/24 | 20 | 0 | true | +-----+--------------+-----------------------+-----------------+-------------+---------+ - + Stop jails ---------- -
gocage stop test
+
gocage stop test
Update jails ---------- To update jail patch version, use gocage update : -
gocage update test
+
gocage update test
Update basejails/releases ---------- To update basejails, you need to update the release they are based on. Specify release with -r, and the datastore storing concerned release with -d : -
gocage update -d fastgocage -r 14.1-RELEASE
+
gocage update -d fastgocage -r 14.1-RELEASE
Upgrade jails ---------- To upgrade jail to newer release, use gocage upgrade : -
gocage upgrade -r 13.2-RELEASE test
+
gocage upgrade -r 13.2-RELEASE test
A pre-upgrade snapshot wil be made so you can rollback if needed. @@ -162,7 +162,7 @@ You can now update ports. Delete jails ---------- -
gocage destroy test
+
gocage destroy test
Multi datastore @@ -171,7 +171,7 @@ A datastore is a ZFS dataset mounted. It should be declared in gocage.conf.yml,
datastore:
   - /iocage
   - /fastiocage
-
+
In gocage commands, datastore name is the mountpoint without its "/" prefix. @@ -184,7 +184,7 @@ In gocage commands, datastore name is the mountpoint without its "/" prefix. +------------+-------------+------------+-----------+----------+------------+ | fastiocage | /fastiocage | ssd/iocage | 1.5 TB | 65.3 KB | 34.6 KB | +------------+-------------+------------+-----------+----------+------------+ -
+
### Filter datastores As with jails and snapshots, you can filter by name: @@ -194,7 +194,7 @@ As with jails and snapshots, you can filter by name: +============+=============+============+===========+==========+============+ | iocage | /iocage | hdd/iocage | 1.6 TB | 414.9 GB | 27.5 KB | +------------+-------------+------------+-----------+----------+------------+ -
+
### Sort datastores You can sort datastores: @@ -206,7 +206,7 @@ You can sort datastores: +------------+-------------+------------+-----------+----------+------------+ | fastiocage | /fastiocage | ssd/iocage | 1.5 TB | 65.3 KB | 34.6 KB | +------------+-------------+------------+-----------+----------+------------+ -
+
See [cmd/struct.go](https://git.nosd.in/yo/gocage/src/branch/master/cmd/struct.go) for field names. @@ -226,7 +226,7 @@ Snapshot data/iocage/jails/srv-random: Done Snapshot data/iocage/jails/srv-random/root: Done Migrate jail config dataset to fastdata/iocage/jails/srv-random: Done Migrate jail filesystem dataset to fastdata/iocage/jails/srv-random/root: Done -
+
Fetch @@ -234,7 +234,7 @@ Fetch Files can be fetched from custom repository, or from local directory with "from" option. For example if you destroyed releases/12.3-RELEASE and still have the downloaded files in /iocage/download/12.3-RELEASE:
gocage fetch -r 12.3 -d iocage -f file:/iocage/download
-
+ TODO