Backup Strategy
3-2-1 Backup Setup
In this example, we are backing up a ZFS pool RAID 1 consisting of two 2TB Samsung 990 EVO PRO SSDs.
The goal is to implement the 3-2-1 backup strategy: three copies of your data on two different media, with one copy offsite. This setup is designed for a homelab using consumer software, which adds some challenges due to the lack of enterprise-level scalability. Here's how to do it.
Step 1: Install Proxmox Backup Server (PBS) with Drive Passthrough
First, install PBS with my drive passthrough script. This passthrough drive will be our first backup. Note that while this setup is fine for a homelab, there is a risk in having the backup drive on the host machine that you should be aware of.
Installation Steps:
- Access Administration:
- Go to the browser and navigate to
Administration > Repositories
. - Add or remove appropriate free and enterprise repositories as necessary.
- Update and Reboot:
- Open the shell and run:
apt update
apt upgrade
- Reboot the system if a kernel update is applied.
- Prepare the Backup Drive:
- Go to
Administration > Storage > Disks
and wipe the disk you intend to use. - Then, either create a directory or a ZFS filesystem on this drive.
- Add PBS to Proxmox:
- Go back to the dashboard and copy the fingerprint of the PBS instance.
- Ensure the "Add as datastore" option is checked and note the datastore name you select.
- Configure Proxmox:
- In Proxmox, go to
Datacenter > Storage > Add > Proxmox Backup Server
. - Set the following values:
- ID: Choose a unique identifier.
- Server: IP address of the PBS instance.
-
Username:
root@pam
or the appropriate user. - Password: Password set in PBS.
- Datastore: Name you noted earlier.
- Fingerprint: Paste the fingerprint you copied.
Now, you can run your backup.
Step 2: Set Up Samba File Share
Since we need to spin up a Windows VM (because Rclone doesn't work well with Proton Drive and Proton Drive only supports NTFS), we'll set up a Samba file share.
Installation and Configuration:
- Install Samba:
apt install samba
- Configure Samba:
- Edit the Samba configuration file:
nano /etc/samba/smb.conf
[SharedDrive]
path = /mnt/new-storage
browseable = yes
read only = no
guest ok = yes
force user = root
- path: Directory you want to share.
- browseable: Allows the share to be visible when browsing network shares.
-
read only: Set to
no
to allow writing to the share. -
guest ok: Set to
yes
to allow access without a password (optional). - force user: Ensures files are accessible to all users via Samba.
- Set Permissions:
- Ensure that the directory you're sharing has the correct permissions:
chmod -R 0777 /mnt/new-storage
This makes the directory readable and writable by all users. Adjust permissions as necessary depending on your security requirements.
-
Restart Samba Service:
- Apply the changes by restarting the Samba service:
bash systemctl restart smbd
Step 3: Access the Share from Windows
Step 4: Secure Samba Share with a Password (Optional)
If you want to secure your Samba share with a password, follow these steps:
- Create a Samba User: Add a Linux user if it doesn't already exist:
adduser yourusername
Add the user to Samba:
smbpasswd -a yourusername
- Modify Samba Configuration: Edit the Samba configuration file:
nano /etc/samba/smb.conf
[SharedDrive]
path = /mnt/new-storage
browseable = yes
read only = no
valid users = yourusername
force user = root
- Restart Samba Service: Apply the changes by restarting the Samba service:
systemctl restart smbd
By following these steps, you can share the passed-through drive on your Proxmox server with a Windows PC, allowing it to be accessed and used from both systems.