Common Commands

This guide provides a list of some common commands you can use in the Bytemark Command-Line Client.

Basic Commands

  • Show all available commands:
    • bytemark
  • Show information about your account:
    • bytemark show account alice
  • Set the default account and username. NB: usually, your username is also your account name. But that’s not always the case, and you may have access to multiple accounts.
    • bytemark update config --account alice
    • bytemark update config --user alice
  • Show information about a server in the group ‘default’:
    • bytemark show server monkey.default
  • Restart a server:
    • bytemark restart server monkey.default

Connect to the console

To connect to the serial or graphical console, you first need to add your SSH public key to the list of allowed keys:

bytemark add key --public-key-file ~/.ssh/id_rsa.pub

You need to add at least one key to be able to connect. Once you’ve done that, use one of the following commands to connect:

  • Connect to the graphical console:
    • bytemark console monkey
  • Connect to the serial console:
    • bytemark console --serial monkey

Backup a secondary disc

You can add up to 8 discs through the panel. If you do choose to add discs through the command line, then make sure you use either ‘archive’ or ‘sata’ (SSD) grade. Avoid the other grades, which can be unexpectedly pricey!

You can’t create backups of secondary discs through the panel, but you can do it through the command line. You can’t do it at all for “archive” grade discs, as these are generally used for backups anyway.

Here, I’m going to create a backup for a disc called ‘disc-p’ on a server called ‘symbiosis’, in a group called ‘mail’

  • show the assets on the server, to find the disc label
    • bytemark show server --server symbiosis.mail
  • create a backup
    • bytemark create backup --server symbiosis.mail --disc disc-p
  • list backups
    • bytemark list backups --server symbiosis.mail --disc disc-p
  • shutdown server (to enable restore)
    • bytemark shutdown --server symbiosis.mail
  • restore the backup NB: you should wait until the backup doesn’t show ” (in progress)” in the listing. When you start the restore, you’ll see subsequent listings show a new backup that is a snapshot of the disc image that you’re restoring over the top of. It will show “(in progress)” for a while.
    • bytemark restore backup --server symbiosis.mail --disc disc-p --backup disc-p-backup-20180314174509
  • start up server
    • bytemark start --server symbiosis.mail
Updated on February 20, 2019

Was this article helpful?

Related Articles

Have you tried Kubernetes?
Kubernetes (K8s) is helping enterprises to ship faster & scale their business. Sounds good? Let us build a K8s solution for your needs.
Register your interest