Using an external USB hard drive for backups

allanl

New Member
Jan 18, 2025
6
1
3
Has anyone plugged in an external USB drive to use for secondary backup purposes? My thought is that a new Proxmox server could be installed, then move the external USB drive from the original to the new server and then restore the backups to the new system once Proxmox boots and sees the external USB.

Will this actually work?
 
Hi @allanl

this is possible, example disk is attached to Proxmox PVE as Directory with Ext4 FS and you have backups already there.

1) Remove Directory from Datacenter / Storage

1739375354793.png
Umount the disk on source server

1739374258887.png

2) Attach the disk into destination server


1739374388768.png


Mount the disk

1739374637130.png

1739375532351.png

And in Datacenter add Directory

1739374724162.png

Backup directory with image, ready for restore

1739375586283.png
 

Attachments

  • 1739374652281.png
    1739374652281.png
    2 KB · Views: 6
Last edited:
  • Like
Reactions: tscret
Hi after i reboot proxmox the disk is not mounted anymore,so everytime i have to to the procedure again
 
You need to edit fstab, there is needed to have basic knwoledge of linux

---

1) First get to know UUID of you removable drive sudo blkid or blkid

2) Get info about file system df -T

2) Add new line with editing sudo nano /etc/fstab or nano /etc/fstab the ext4 present parameter for files system, you need to fulfill what you get from step 2, and also correct UUID from step 1

Example of the record:
UUID=9f7a8418-80aa-4059-86aa-02a853d458ce /mnt/pve/backup/ ext4 defaults,noatime 0 0
 
  • Like
Reactions: pr777
The following variation allows you to disable the storage (with pvesm or the GUI) and unmount the drive. Later you can plug it back in and re-enable the storage and it will automatically be mounted. I use a label rather than a UUID so I can rotate my backup drives (they all have the same label).

Code:
LABEL=backup            /mnt/backup     ext4    noauto,x-systemd.automount      0 2
 
with the other method it didnt work for me.I hade proxmox in emergency mode after reboot.

on shell type

ls -l /dev/disk/by-uuid/*

find your usb uuid from the list

then

nano /etc/fstab

add a line

dev/disk/by-uuid/add-your-device-number /mnt/backup ext4 defaults 0

save

then

systemctl daemon-reload

with lsblk you can see that the usb device is mounted in /mnt/backup

then go
datacenter-----> storage--------> add directory

choose an id
directory---> /mnt/backup
choose your content you want to add

then you can see your usb disk from the list ..

after reboot your usb is mounted on the system as backup drive
 
Last edited:
for extra points:

automate the whole process with shell script, triggered by a udev rule. If I have some time I will write it for you, but generally speaking:

on attachment: mount usb drive, enable the associated store in pvesm
on detachment/dismount: disable store
 
  • Like
Reactions: pr777