Creating Backups (Linux)
Contents
Create a Shared Folder
Ubuntu
-
Install Samba if not already:
sudo apt install samba && sudo systemctl enable smbd
-
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.
-
Identify or create a folder to store your server backups.
This folder can be located on an external drive connected to your Linux machine.
-
Right click the folder and click "Properties".
-
Click "Local Network Share".
-
Select "Share this folder" and give the folder a Share name. Remember the name, you will need it later. Then click "Create Share".
-
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
-
Install Samba if not already:
sudo apt install samba && sudo systemctl enable smbd
-
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.
-
Identify or create a folder to store your server backups.
This folder can be located on an external drive connected to your Linux machine.
-
Right click the folder and click "Sharing Options".
-
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".
-
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
-
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
-
-
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
-
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 yourShare Name
. Remember the name, you will need it later.path
is the directory path to the share folder from above.
-
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.
-
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
-
In StartOS, go to
System > Create Backup
. -
Click "Open New".
-
Complete the form:
-
Hostname: The name of your Linux machine on the LAN.
-
Path - The "Share Name" (name of the share in your samba config), not the full directory path. (e.g. "backup-share" in the example).
-
Username - Your Linux username on the remote machine that you used to create the shared directory.
-
Password - The password you set above using smbpasswd
-
-
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.