Connecting your worker/server

How to connect a server to SimpleBackups to take your backups through.

To take your backups, you could use our serverless workers (zero-config needed) - or connect your own servers (referred to as backup workers). SimpleBackups offers multiple ways to connect your servers, we will go through them below and explain how to customize some of them.

 

SimpleBackups allows you to connect any server based on Linux. To connect your server, SimpleBackups requires SSH access, which can be done using a couple of options.

Available Connection Methods

1. Automated (SSH key)

We'll provide you with a command that contains a unique ID (API Token), that once run on your server, will take care of:

  • Connecting your server and adding the required components to run backups
  • Establishing the SSH connection between your server and SimpleBackups

That's it, once the script runs, you'll be able to configure your backup afterwards since it will automatically add your server to your SimpleBackups dashboard.

 
ℹ️
What you'll need
  • SSH access to your sever, ability to run a shell command on your server
 

2. Manual (SSH Key and/or Password)

If your server requires a password or you need to change some connection values via the GUI.

ℹ️
What you'll need
  • IP (and port if not default) of your server
  • SSH username
  • SSH password (optional, can be left blank)
 

3. Tunnel / Bastion Host

This method can be used with serverless option only, if you want to tunnel your backup through a specific host (jump server). You cannot use this method to connect a backup worker.

 

Automated Method — Advanced Usage

When you use the Automated (SSH key) command to connect your server to SimpleBackups, you have the option to run it in three ways, unattended mode, preset unattended mode, and interactive mode.

1. Unattended mode

This mode does not request any inputs from the user. It automatically discovers all the needed values like the SSH host, port, home directory, and server or hostname.

Example

bash -c "$(curl -sSL 'https://my.simplebackups.com/api/connect')"

→ Useful when you want to use the command in your recipes and server provisioning scripts

→ and when you don't have custom/specific values you want to use for your server's port, host, etc...

2. Preset unattended mode

Identical to the unattended mode, but allows you to override all values if needed. You have the option to add any of the following lines before you run the command to pre-define the value you need.

export SB_SSH_USER="ubuntu" # (optional) the SSH user
export SB_SERVER_HOST="1.1.1.1" # (optional) the SSH IP address/host
export SB_SSH_PORT="22" # (optional) the SSH port if not 22
export SB_SERVER_NAME="App Server" # (optional) how your server appears on SimpleBackups dashboard
export SB_SERVER_OPS_DIR="/home/user" # (optional) a directory accessible by the SSH user, used by SimpleBackups
export SB_SSH_KEY="auto" # (optional) if you need to use an RSA key, set it to "rsa", otherwise leave on "auto"

Then:

bash -c "$(curl -sSL 'https://my.simplebackups.com/api/connect')"

→ Useful when you want to use the command in your recipes and server provisioning scripts, but still pre-define certain values

→ Useful for non-standard SSH connections with custom ports, or servers behind gateways

3. Interactive mode

In this mode, you will be asked interactively to provide values for your SSH user, port, host and so on. You can just skip certain questions and the command will automatically discover these values for you.

bash -c "$(curl -sSL 'https://my.simplebackups.com/api/connect')" -s interact

→ Useful when you want to type in every value yourself and set it to what you know will work

Did this answer your question?
😞
😐
🤩

Last updated on April 29, 2023