mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-03 19:23:42 +01:00
docs: Add migrate docs
This commit is contained in:
@@ -1,7 +1,44 @@
|
||||
=========
|
||||
Migration
|
||||
=========
|
||||
|
||||
Bastille
|
||||
--------
|
||||
|
||||
Bastille supports migrations to a remote system using the ``migrate`` subcommand.
|
||||
|
||||
Prerequisites
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
There are a couple of things that need to be in place before running the ``migrate`` command.
|
||||
|
||||
First, you must have bastille configured both locally and remotely to use the same filesystem
|
||||
configuration. ZFS on both, or UFS on both.
|
||||
|
||||
Second, we need a user on the remote system that has key-based authentication set up. Bastille
|
||||
does not support password-based authentication. This also implies that SSH is working on the
|
||||
remote system. This user also needs ``sudo`` permissions on the remote system.
|
||||
|
||||
Third, if updating from a previous version, please make sure to ``diff`` your ``bastille.conf``
|
||||
file, as the ``migrate`` sub-command adds a new variable called ``bastille_migratedir``.
|
||||
|
||||
Migration
|
||||
^^^^^^^^^
|
||||
|
||||
To migrate a jail (or multiple jails) we can simply run
|
||||
``bastille migrate TARGET USER HOST``. This will export the jail(s), send them to the
|
||||
remote system, and import them.
|
||||
|
||||
The ``migrate`` sub-command includes the ``-a|--auto`` option, which will auto-stop the old jail,
|
||||
migrate it, and attempt to start the migrated jail on the remote system after importing it. See the
|
||||
warning below about auto-starting the migrated jail.
|
||||
|
||||
WARNING: Every system is unique, has different interfaces, bridges, and network configurations.
|
||||
It is possible, with the right configuration, for jails to start and work normally. But for some
|
||||
systems, it will be necessary to edit the ``jail.conf`` file of the migrated jail to get it working
|
||||
properly.
|
||||
|
||||
You can optionally set ``-d|--destroy`` to have Bastille destroy the old jail on completion.
|
||||
|
||||
iocage
|
||||
------
|
||||
|
||||
|
||||
18
docs/chapters/subcommands/migrate.rst
Normal file
18
docs/chapters/subcommands/migrate.rst
Normal file
@@ -0,0 +1,18 @@
|
||||
migrate
|
||||
=======
|
||||
|
||||
The ``migrate`` sub-command allows migrating the targeted jail(s) to
|
||||
another remote system. See the chapter on Migration.
|
||||
|
||||
This sub-command supports multiple targets.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille migrate help
|
||||
Usage: bastille migrate [option(s)] TARGET USER HOST
|
||||
|
||||
Options:
|
||||
|
||||
-a | --auto Auto mode. Start/stop jail(s) if required.
|
||||
-d | --destroy Destroy local jail after migration.
|
||||
-x | --debug Enable debug mode.
|
||||
Reference in New Issue
Block a user