Dietpi Restore Backup Issue

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=8 G_DIETPI_VERSION_SUB=24 G_DIETPI_VERSION_RC=1 G_GITBRANCH='master' G_GITOWNER='MichaIng'
  • Distro version | bookworm
  • Kernel version | Linux DietPi 6.1.63-current-rockchip64 #1 SMP PREEMPT Mon Nov 20 10:52:19 UTC 2023 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | ROCKPro64 (aarch64)
  • SD card used | SanDisk ultra 32gb

Hi, I have a problem restoring my previous backup…
I should somehow force the backup to succeed…

It tells me see previous errors but I don’t see them…
can someone help me? Thank you

Where can I find the more detailed log?

│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/lists/lock                                                          
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_non-free_binary-arm64_Packages.xz                               
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_non-free-firmware_binary-arm64_Packages.xz                      
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_main_binary-arm64_Packages.xz                                   
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_contrib_binary-arm64_Packages.xz                                
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_InRelease                
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages.xz                           
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/lists/deb.debian.org_debian_dists_bookworm-updates_InRelease        
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian_dists_bookworm-backports_non-free_binary-arm64_Packages.xz                     
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian_dists_bookworm-backports_main_binary-arm64_Packages.xz                         
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian_dists_bookworm-backports_contrib_binary-arm64_Packages.xz                      
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/lists/deb.debian.org_debian_dists_bookworm-backports_InRelease      
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian-security_dists_bookworm-security_main_binary-arm64_Packages.xz                 
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/deb.debian.org_debian-security_dists_bookworm-security_InRelease                                     
│ 2023/12/13 15:36:26 [1742] *deleting    var/lib/apt/lists/apt.armbian.com_dists_bookworm_main_binary-arm64_Packages.xz                                         
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/lists/apt.armbian.com_dists_bookworm_main_binary-all_Packages.xz    
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/lists/apt.armbian.com_dists_bookworm_InRelease                      
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/lists/                                                              
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/extended_states                                                     
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/apt/                                                                    
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/shells.state                                                            
│ 2023/12/13 15:36:26 [1742] *deleting   var/lib/                                                                        
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/private/                                                              
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/ldconfig/aux-cache                                                    
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/ldconfig/                                                             
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/debconf/templates.dat-old                                             
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/debconf/templates.dat                                                 
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/debconf/passwords.dat                                                 
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/debconf/config.dat-old                                                
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/debconf/config.dat                                                    
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/debconf/                                                              
│ 2023/12/13 15:36:26 [1742] cannot delete non-empty directory: var/cache/apt                                            
│ 2023/12/13 15:36:26 [1742] cannot delete non-empty directory: var/cache/apt                                            
│ 2023/12/13 15:36:26 [1742] *deleting   var/cache/adduser/                                                              
│ 2023/12/13 15:36:26 [1742] cannot delete non-empty directory: var/cache                                                
│ 2023/12/13 15:36:26 [1742] *deleting   var/backups/                                                                    
│ 2023/12/13 15:36:26 [1742] *deleting   var/run                                                                         
│ 2023/12/13 15:36:26 [1742] *deleting   var/lock                                                                        
│ 2023/12/13 15:36:30 [1742] sent 10,936,511,961 bytes  received 1,816,929 bytes  13,139,133.80 bytes/sec                
│ 2023/12/13 15:36:30 [1742] total size is 11,831,122,123  speedup is 1.08                                               
│ 2023/12/13 15:36:30 [1742] sent 10936511966 bytes  received 2277927 bytes  total size 11831122123                      
│ 2023/12/13 15:36:30 [1742] rsync error: some files/attrs were not transferred (see previous errors) (code 23) atmain.c(1338) [sender=3.2.7]            
root@DietPi:~# dmesg -l 0,1,2,3
[    2.102638] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    2.196263] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with 0-001b
[    2.349899] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with vcc3v3-sys
[    3.117322] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with 0-001b
[    3.275785] rockchip-vop ff8f0000.vop: [drm:vop_crtc_atomic_flush] *ERROR* VOP vblank IRQ stuck for 10 ms
[    4.829433] OF: graph: no port node found in /i2c@ff3d0000/typec-portc@22
[    5.028494] rockchip-vop ff8f0000.vop: [drm:vop_crtc_atomic_flush] *ERROR* VOP vblank IRQ stuck for 10 ms
root@DietPi:~# 

root@DietPi:/mnt/3e2dd385-23d4-4136-b377-ef4135839c32/dietpi-backup# cat .dietpi-backup_stats
2023-12-09_18:20:53  Backup starting
2023-12-12_23:17:21  Restore starting
2023-12-13_10:05:12  Restore starting
2023-12-13_14:06:48  Restore starting
2023-12-13_15:21:58  Restore starting

certainly for me it is important to restore the applications that ran above… and I see that they have been backed up

If the only errors you get is not being able to remove the non-empty directory var/cache/apt, then I don’t see too much of a problem here.

so to ensure that the restore is successful just run these commands before doing the restore?

sudo rm -rf /var/cache/apt
sudo rm -rf /var/cache

Yes, the last one will cover both.

or you can try following

/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update && apt upgrade

i try the command but not work, i mean the command work but the restore nop
here u can find the log Deleted

Is there any command to see the integrity of the backup? or to understand the cause of the failed restore…

the restore did not fail totally. At least from the log, it is /var/cache only, which should not much of an issue.

The screen on dietpi shows me “failed” I continue anyway… and I see my apps and many systemctl services are not started and there are errors so I restart and it doesn’t start anymore… I connect and I see these problems during the boot phase

root@DietPi:~# dmesg -l 0,1,2,3
[ 2.102638] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[ 2.196263] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with 0-001b
[ 2.349899] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with vcc3v3-sys
[ 3.117322] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with 0-001b

PS. when the restore finishes and it gives me “failed” and I try to do an update and upgrade it gives me “E: Error reading the CPU table”

Just to clarify, are you trying to restore the backup from the same SBC (the RockPro64) and the same dietpi version?
Meaning that the only thing that changed was the SD card or even the SD card is the same?
What was the reason for restoring? Some corruption?
Are you certain that the backup is intact?

yes, the version was the same as dietpi, and also the kernel, as far as corruption is concerned, I don’t know… are there commands to check?

the restore is done from an external stick where the backup was made… it is always attached to the rockpro

You can initiate filesystem checks with dietpi-drive_manager. Select the drive you wanna check and in the next menu there is an option for this.

Now I try to restore? I repair

Make a copy of the usb stick using dd first, then try anything.