[REINSTALLED FRESH] I broke my partitions AND grub with sgdisk -e /dev/sda* - any way to fix this?

Code:
root@andrzejl:~# /root/.bin/BackUpCritSH
/root/.bin/BackUpCritSH: line 22: /mnt/pve/USB2TBWDGREEN/BackUpCritSH/BKPDEST.mrg: No such file or directory
/root/.bin/BackUpCritSH: line 27: /root/bin/getdrive-byids: No such file or directory
  Volume group "pve" successfully backed up.
/notshrcompr/bkpcrit---pve-root
'/root/.bin/BackUpCritSH' -> '/notshrcompr/bkpcrit---pve-root/BackUpCritSH'
cp: cannot stat '/root/localinfo.dat': No such file or directory
'/etc/fstab' -> '/notshrcompr/bkpcrit---pve-root/fstab'
cp: cannot stat '/tmp/smartctl.txt': No such file or directory
cp: cannot stat '/tmp/fdisk-l.txt': No such file or directory
Problem opening -l for reading! Error is 2.
The specified file does not exist!
'/tmp/gdisk-l-rootdisk.txt' -> '/notshrcompr/bkpcrit---pve-root/gdisk-l-rootdisk-20240520.txt'
o Clearing old files
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: /usr/NX/etc: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading `/' from member names
tar: /usr/NX/share: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading `/' from member names
tar: /usr/NX/var: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: /home//src: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading `/' from member names
tar: /home//bin: Cannot stat: No such file or directory
tar: /home//.bashrc: Cannot stat: No such file or directory
tar: /home//gonow: Cannot stat: No such file or directory
tar: /home//.screen*: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: .[^.]*: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
total 256M
drwxr-x--- 2 root root 4.0K May 20 20:16 .
drwxr-xr-x 3 root root 4.0K May 20 20:16 ..
-rwxr-xr-x 1 root root 6.4K May 20 20:17 BackUpCritSH
-rw-r--r-- 1 root root  122 May 20 20:17 bkp--bin.tar.lzop
-rw-r--r-- 1 root root 164M May 20 20:17 bkp-boot--debian.tar.lzop
-rw-r--r-- 1 root root 383K May 20 20:17 bkp-DEV--debian.tar.lzop
-rw-r--r-- 1 root root  122 May 20 20:17 bkp--dotfiles--restore-locally.tar.lzop
-rw-r--r-- 1 root root 920K May 20 20:17 bkp-ETC--debian.tar.lzop
-rw-r--r-- 1 root root  122 May 20 20:17 bkp-NXETC--debian.tar.lzop
-rw-r--r-- 1 root root  122 May 20 20:17 bkp-NXSHARE--debian.tar.lzop
-rw-r--r-- 1 root root  122 May 20 20:17 bkp-NXVAR--debian.tar.lzop
-rw-r--r-- 1 root root  19K May 20 20:17 bkp-rootshomedirectory--debian.tar.lzop
-rw-r--r-- 1 root root  122 May 20 20:17 bkp--src.tar.lzop
-rw-r--r-- 1 root root  240 May 20 20:17 bkp-usr-local-bin--debian.tar.lzop
-rw-r--r-- 1 root root  84M May 20 20:17 bkp-var-cache-apt-backups.tar.lzop
-rw-r--r-- 1 root root 443K May 20 20:17 bkp-var-dpkg-backups.tar.lzop
-rw-r--r-- 1 root root 6.1M May 20 20:17 bkp-var-dpkg-status.tar.lzop
-rw-r--r-- 1 root root  214 May 20 20:17 bkp-var-lib-firewall.tar.lzop
-rw-r--r-- 1 root root  214 May 20 20:17 bkp-var-lib-lxc.tar.lzop
-rw-r--r-- 1 root root 623K May 20 20:17 bkp-var-lib-pve-cluster.tar.lzop
-rw-r--r-- 1 root root  342 May 20 20:17 bkp-var-lib-vz.tar.lzop
-rw-r--r-- 1 root root 1.5K May 20 20:17 bkp-var-spool-cron.tar.lzop
-rw-r--r-- 1 root root  728 May 20 20:17 df-20240520.txt
-rw-r--r-- 1 root root  844 May 20 20:17 df-h.txt
-rw-r--r-- 1 root root 7.3K May 20 20:17 fdisk-l-20240520.txt
-rw-r--r-- 1 root root  207 May 20 20:17 fstab
-rw-r--r-- 1 root root   33 May 20 20:17 gdisk-l-rootdisk-20240520.txt
Filesystem           Type  Size  Used Avail Use% Mounted on
/dev/mapper/pve-root ext4   37G  3.7G   32G  11% /
/notshrcompr/bkpcrit---pve-root
Mon May 20 08:17:13 PM IST 2024 - /root/.bin/BackUpCritSH done
/root/.bin/BackUpCritSH: line 161: gotifytest-general.sh: command not found
root@andrzejl:~# ls --full /mnt/pve/USB2TBWDGREEN/BackUpCritSH/
total 0
root@andrzejl:~#

Some errors appeared - no backup files were created.

Cheers,

Andrzej
 
  • Like
Reactions: Kingneutron
Backup files were definitely created, look in
/notshrcompr/bkpcrit---pve-root

Fix:
mkdir -pv /root/bin/boojum

Put the BKPDEST.mrg file there ^^ and edit it to define the mount point for your backups.

You can edit /root/bin/getdrive-byids and fix it for your environment, that file is in the root of the ansitest repo / .zip file that you can download

The rest of the errors don't matter that much, I have some custom files that get created in /etc/rc.local

I just uploaded rc.local to the repo for convenience; if you want to re-download the .zip it will fix most of the errors if you copy it to /etc

/ That's the problem with a customized system, it gets a little difficult to share with the world ;-)
 
  • Like
Reactions: AndrzejL

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 yours easily in our online shop.

Buy now!