Help with simple backup scenario

  • Thread starter Thread starter cadiolis
  • Start date Start date
C

cadiolis

Guest
Within our office I had three semi-decent machines lying around so I installed Proxmox on them and we run various things such as test environments and our build server, etc...

One of the three machines has an extra hard drive in it that I'd like to use as a backup drive. However, I'm missing some key data as I can't get things to work. I have read the Storage Model wiki page as well as studied up a bit on LVM (but I am still quite a noob with LVM)

What are the simplest steps to get backs running from the VEs on all three machines to the extra hard drive? I created a LVM volume group called 'backups' on the drive, but this VG is only visible in the admin web page on the machine the drive is in. I can't see it from the other machines. Furthermore, I can't even see the 'VZDump Backups' option in the 'Content' drop down.

I also tried to just mount the filesystem as /backups on that machine but didn't have much luck their either. I found forum posts mentioning that you need to then create /backups on all the hosts but I can't find any docs on that so I must be missing something obvious there
 
I suggest you just mount the additional hard drive on the host and export the mount via NFS. this NFS share can be used on any Proxmox VE host as vzdump target.
 
I will check out NFS

For the sake of understanding, can someone explain how the directory option works? If I create a /backups on the master and then a corresponding 'backups' entry in the Proxmox admin UI it will work correctly and show the correct disk usage, etc... However, if I create a /backups on a slave node I can't seem to do anything with it from the slave node (get write access denied because AFAIK everything has to be done from the master). I saw a forum post about creating a /backups on master and slave but didn't follow how that is supposed to work

I would also like to understand more about how the 'Add LVM Group' option works. Is it possible to use this for backups? I don't see 'Backups' as an option in the 'Content' when using the LVM option. And I can only see the volume I created on the slave web admin but again can't do anything with it here.
 
if you got a network mount on a 'dir' you can use this as backup storage. a simple case is NFS, here we did a deeper integration.

but if you just create /backup which is a local mount point the data just goes to the local disk. because of the design of our storage model, all dir´s must be available on all nodes, so you need this dir also on the nodes. but this does not mean that anything is shared.

LVM volumes cannot be used directly for backup´s.
 
but if you just create /backup which is a local mount point the data just goes to the local disk. because of the design of our storage model, all dir´s must be available on all nodes, so you need this dir also on the nodes. but this does not mean that anything is shared.

So I have to create /backups on all nodes, but it would only be used on the master node? If I have a 50GB partition with a /backups dir on the master and a 500GB /backups partition on a slave is that 500GB /backups used for anything?
 
backup is configured on the master but for each node separately. so use the master to configure the backup for node x, and use /backup on node x.
 
Yeah - I'm not getting this
* On node1 - I create /node1backups (500GB)
* On master - I create a directory store /node1backups. It shows as 50GB free which is the free disk space on the root partition on the master
* On node1 - I click to add backup and I do see /node1backups showing 500GB free. However I cannot save the configuration as I get the "no write access" error as this is not the master
* On master - I create a backup and I see /node1backups showing 50GB free but it does let me create the backup.

Maybe the simple question is - Is it possible to do backups using a directory which is not on the master?
 
Yeah - I'm not getting this
* On node1 - I create /node1backups (500GB)
* On master - I create a directory store /node1backups. It shows as 50GB free which is the free disk space on the root partition on the master

yes, if you create a dir in the root partition you will see the total free space from root.

* On node1 - I click to add backup and I do see /node1backups showing 500GB free. However I cannot save the configuration as I get the "no write access" error as this is not the master

configuration on the gui is done on the master, only on the master.

* On master - I create a backup and I see /node1backups showing 50GB free but it does let me create the backup.

Maybe the simple question is - Is it possible to do backups using a directory which is not on the master?

this should work, what is the issue/error here?
 
The issue is that it backs it up to /node1backups on the master. Sorry, my statement should have read "On master - I create a backup and I see /node1backups showing 50GB free but it does not create the backup on node1"

So the basic question is: Is it possible to use the "directory" backup method, to backup to a directory on a node
 
Can you list the steps to accomplish this? As listed above when I try to do it, it fails. You can't create storage on the node and creating storage named /node1backups on the master backs it up to the master
 
This is quite interesting. Thank you for you help. I will explain verbosely step by step and please tell me where I have gone wrong (I have re-read your posts and the wiki page)
1. Install Proxmox on master
2. Install Proxmox as node1 as slave
3. Setup cluster
4. Install a couple of virtual machines on both master and node1
5. At this point everything is great, but now we want to do some backups. There is a second hard disk on node1 (/dev/sdb) that is currently entirely unused
6. SSH into node1, create a large partition (/dev/sdb1) on /dev/sdb, format it with ext4, and mount it as /node1backups. 'df' on the node shows 500 GB free on the /node1backups mount
7. At this point I need to be able to setup the /node1backups as a storage in the cluster so that I can store backups from all VE's in the cluster to it
8. Now I login to the web interface of the master (as everything in a cluster must be done on the master). I click 'Storage' and then 'Add Directory'. Storage name is 'backups' and directory is '/node1backups'. This is where things don't make sense to me as the capacity shows in the web admin as 50 GB free. This is the free space on the root directory on the master. When I SSH into the master I can see it created a /node1backups folder. On the other hand this does make sense because how is the master to know that there is a /node1backups on the node?
9. If I log into the web admin of the node now, and view the backups section I see the 'backups' storage reporting the 500GB free. However, I still cannot add backups from the node web admin so I'm out of luck here
10. So from the master web admin I can add a backup. When I select the storage destination, 'backups' reports 50GB free. After I save and wait till the backup is executed it is in /node1backups on the master


So from the above steps, I see no way to store backups in /node1backups on the node (and not on the master). Can you please review these steps, perhaps try them out, and let me know where I am straying?
 
This is quite interesting. Thank you for you help. I will explain verbosely step by step and please tell me where I have gone wrong (I have re-read your posts and the wiki page)
1. Install Proxmox on master
2. Install Proxmox as node1 as slave
3. Setup cluster
4. Install a couple of virtual machines on both master and node1
5. At this point everything is great, but now we want to do some backups. There is a second hard disk on node1 (/dev/sdb) that is currently entirely unused
6. SSH into node1, create a large partition (/dev/sdb1) on /dev/sdb, format it with ext4, and mount it as /node1backups. 'df' on the node shows 500 GB free on the /node1backups mount
7. At this point I need to be able to setup the /node1backups as a storage in the cluster so that I can store backups from all VE's in the cluster to it

as this is a local drive on your node1 you cannot use it to store backups from other nodes. only from node1. if you want to use this disk on all nodes, you need to make it accessible to all nodes, e.g. with NFS server.

8. Now I login to the web interface of the master (as everything in a cluster must be done on the master). I click 'Storage' and then 'Add Directory'. Storage name is 'backups' and directory is '/node1backups'. This is where things don't make sense to me as the capacity shows in the web admin as 50 GB free. This is the free space on the root directory on the master. When I SSH into the master I can see it created a /node1backups folder. On the other hand this does make sense because how is the master to know that there is a /node1backups on the node?

this is shortcoming of the 1.x storage model. on the master you will see always the local storage of the master. but you can define a backupjob for node1, using the /node1backups. this means the backup of the VM´s from node1 will to to this big space as expected, but confusing, yes. btw, 2.0 will solve this.

9. If I log into the web admin of the node now, and view the backups section I see the 'backups' storage reporting the 500GB free. However, I still cannot add backups from the node web admin so I'm out of luck here
10. So from the master web admin I can add a backup. When I select the storage destination, 'backups' reports 50GB free. After I save and wait till the backup is executed it is in /node1backups on the master


So from the above steps, I see no way to store backups in /node1backups on the node (and not on the master). Can you please review these steps, perhaps try them out, and let me know where I am straying?
 
this is shortcoming of the 1.x storage model. on the master you will see always the local storage of the master. but you can define a backupjob for node1, using the /node1backups. this means the backup of the VM´s from node1 will to to this big space as expected, but confusing, yes. btw, 2.0 will solve this.

Thanks - this answers my question