Best practice for Proxmox self-backup

pdionisis

Member
Aug 31, 2019
10
0
6
50
Hello
Thank for the script

I try to backup the server with it .
Then I try to restore to same machine but with fresh install (same version of proxmox) but pve-cluster refuses to start
I receive pmxcfs error 255

Tried to run pmxcfs I receive :
fuse: mountpoint is not empty
fuse: if you are sure it is safe , use the 'nonempty' mount option

This happenes (if i understood well) because /etc/pve is not empty (probably as it has my setup)

How to continue from there?
How to try to mount the nonempty /etc/pve ?
Thank you
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
6,679
992
163
This happenes (if i understood well) because /etc/pve is not empty (probably as it has my setup)
move your copy of /etc/pve away:
`mv /etc/pve /etc/pve.bck`
restart the pve-cluster service/pmxcfs:
`systemctl restart pve-cluster`

once this works - copy the files you need from /etc/pve.bck to /etc/pve
 
  • Like
Reactions: flames

peterG

Member
Jan 20, 2014
15
3
23
Boston, MA, US
First BIG THX to all here & esp DerDanilo, & we WILL USE this !!

adding my 2 cents

Instead of pick & choose which dir & so & such .. take the entire root fs, so, if using, gd 'ol fashioned LVM and old school way of using fsarchiver cmd line utility like this:

# create the LV snapshot of the root file system

$ lvcreate -L 10G -s -n snapROOTlabel /dev/pve/root

# run the fsarchiver util or put it into script

$ fsarchiver -j 16 -z 9 -L savethisrootfssnapshotlabel savefs ./nameoffsarchiverfsbackup.fsa /dev/mapper/pve-snapROOTlabel

# -j 16 means use 16 cores (multi threading), -z 9 means use lzma level nine compression (opting to use lzma legacy instead of something like zstd or etc .. ), -L is just labeling it ..

# get rid of the snapshot LV after thE backup script finishes ..

$ lvremove /dev/pve/snapROOTlabel
 
  • Like
Reactions: zolo32 and chriss

uwe72

New Member
Jan 3, 2021
2
0
1
49
Does this script from DerDanilo also help after a ssd crash of the proxmox system? Means after reinstalled a new proxmox on a new ssd.

Can i re-create all VMs and CTs with the script (restore)?
 

apoc

Renowned Member
Oct 13, 2017
853
105
63
No. Without a backup no restore.
See the github page for details
 

xmirakulix

Member
Jul 20, 2018
2
4
8
122
Can i re-create all VMs and CTs with the script (restore)?

No, the script currently doesn't have a restore function.
But the backup ist really just an archive of the backuped folders, so you can extract it and put the files of your chosing back.
E.g. the vm<ID>.conf files to recreate all your guests. Of course, the VM/container data (vol or subvols) needs to be there as well, as it is not part of this backup.

I would recommend cherry-picking the part of the configuration you put back, as a newly installed system is sometimes an opportunity for decluttering. At least for me it is.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!