Creating Backups (Linux)

Contents

Create a Shared Folder

Ubuntu

  1. Install Samba if not already:

    sudo apt install samba && sudo systemctl enable smbd
    
  2. Add your user to samba, replacing $USER with your Linux username.

    sudo smbpasswd -a $USER
    

    You will be prompted for your linux password. Then, you must create a new SMB password for the user with permission to write to your new backup share. Keep the password somewhere safe, such as Vaultwarden.

  3. Identify or create a folder to store your server backups.

    
    This folder can be located on an external drive connected to your Linux machine.
    
  4. Right click the folder and click "Properties".

  5. Click "Local Network Share".

  6. Select "Share this folder" and give the folder a Share name. Remember the name, you will need it later. Then click "Create Share".

  7. If your installation of Ubuntu is running a firewall by default or due to your own custom configuration, enter this command to allow connections to Samba. If it generates an error, you can safely ignore it:

    sudo ufw allow Samba
    

Mint

  1. Install Samba if not already:

    sudo apt install samba && sudo systemctl enable smbd
    
  2. Add your user to samba, replacing $USER with your Linux username.

    sudo usermod -a -G sambashare $USER
    sudo smbpasswd -a $USER
    

    You will be prompted for your linux password. Then, you must create a new SMB password for the user with permission to write to your new backup share. Keep the password somewhere safe, such as Vaultwarden.

  3. Identify or create a folder to store your server backups.

    
    This folder can be located on an external drive connected to your Linux machine.
    
  4. Right click the folder and click "Sharing Options".

  5. Select "Share this folder" and give the folder a Share name (maximum 12 characters). Remember the name, you will need it later. Click "Create Share".

  6. If your installation of Mint is running a firewall by default or due to your own custom configuration, enter this command to allow connections to Samba. If it generates an error, you can safely ignore it:

    sudo ufw allow Samba
    

Other Linux

  1. Install Samba if it is not already installed.

    • Arch:

       sudo pacman -S samba
      
    • Debian and Debian-based:

        sudo apt install samba
      
    • CentOS/Redhat

        sudo yum install samba
      
    • Fedora

        sudo dnf install samba
      
  2. Identify or create a folder to store your server backups. Make a note of the directory path. For example:

    mkdir -p /home/$USER/start9-backup
    

    replacing $USER with your Linux username and "start9-backup" with whatever you want the folder to be named.

    
    This folder can be located on an external drive connected to your Linux machine.
    
    
    If you are on Fedora 38+, you need to do an extra step to allow the Samba share in SELinux:
    
        sudo semanage fcontext --add --type "samba_share_t" "/home/$USER/start9-backup(/.*)?"
        sudo restorecon -R /home/$USER/start9-backup
    
  3. Configure Samba by adding the following to the end of your /etc/samba/smb.conf file:

    [backup-share]
        path = "/home/$USER/start9-backup"
        create mask = 0600
        directory mask = 0700
        read only = no
        guest ok = no
    

    Where:

    • [backup-share] can be replaced with whatever you want (must remain inside brackets). This is your Share Name. Remember the name, you will need it later.
    • path is the directory path to the share folder from above.
  4. Open a terminal and enter the following command, replacing $USER with your Linux username:

    sudo smbpasswd -a $USER
    

    This creates a password for the Local Network Share. Keep it somewhere safe, such as Vaultwarden.

  5. If your installation of Linux (Pop-OS users take special note!) is running a firewall by default or due to your own custom configuration, enter this command to allow connections to Samba. If it generates an error, you can safely ignore it:

    sudo ufw allow Samba
    

Create a Backup

  1. In StartOS, go to System > Create Backup.

  2. Click "Open New".

  3. Complete the form:

    1. Hostname: The name of your Linux machine on the LAN.

    2. Path - The "Share Name" (name of the share in your samba config), not the full directory path. (e.g. "backup-share" in the example).

    3. Username - Your Linux username on the remote machine that you used to create the shared directory.

    4. Password - The password you set above using smbpasswd

  4. Click "Connect".

    
    - If you receive `Filesystem I/O Error mount error(13): Permission denied`, ensure you have entered all the correct values in the form. The hostname can be particularly tricky.