mr-manuel / raspberry-pi-backup

This script allows you to backup your Raspberry Pi to a SMB/CIFS share on a NAS/computer without removing the SD card.
MIT License
30 stars 4 forks source link

"ls" error in the end of the script #9

Closed ruildias closed 4 months ago

ruildias commented 7 months ago

Hello,

the script worked well (*) while backup (did it manual the first time), but I got an error:

ls: /mnt/backup/Venus/raspberrypi2/Backup_raspberrypi2_20240409_075209.img: Value too large for defined data type

As this is in the "delete old backups" of the script, I tried to run the "ls" manually and it gave the same result: ls /mnt/backup/Venus/raspberrypi2/Backup_raspberrypi2_20240409_075209.img ls: /mnt/backup/Venus/raspberrypi2/Backup_raspberrypi2_20240409_075209.img: Value too large for defined data type

I am using Venus OS 3.22. Do you have a suggestion ? Thanks in advance

(*) log from the backup itself: " Creating Venus/ on backup mount... Using script dd for backup. 15928000000 bytes (16 GB, 15 GiB) copied, 3424 s, 4.7 MB/s 15931+1 records in 15931+1 records out 15931539456 bytes (16 GB, 15 GiB) copied, 3446.6 s, 4.6 MB/s

Backup completed successfully. "

mr-manuel commented 7 months ago

Try https://github.com/mr-manuel/raspberry-pi-backup/issues/3

ruildias commented 7 months ago

Thanks, I did tried that and it doesn't work ... I tested changing the mount parameters and it doesn't work. but I did find this link, and I tested it:

If I do a specific: "ls -al teste.txt" it works: -rwxr-xr-x 1 root root 256 Apr 9 10:43 teste.txt

If I use: "ls -al"

ls: ./Backup_raspberrypi2_20240409_075209.img: Value too large for defined data type
ls: ./Backup_raspberrypi2_20240409_092341.img: Value too large for defined data type
drwxr-xr-x    2 root     root             0 Apr  9 10:44 .
drwxr-xr-x    2 root     root             0 Apr  9 10:44 ..
-rwxr-xr-x    1 root     root           256 Apr  9 10:43 teste.txt

Seems the size of the file might be the issue (). Here the folder from my windows: image

mr-manuel commented 6 months ago

Unfortunately I'm not able to reproduce it.

Can you execute this commands and post the output?

stat -c "%y %s %n" -- /mnt/backup/Venus/raspberrypi2/*

stat -c "%y %n" -- /mnt/backup/Venus/raspberrypi2/*

ls -lh /mnt/backup/Venus/raspberrypi2
mr-manuel commented 5 months ago

@ruildias any update?

ruildias commented 5 months ago

Hi Manuel, sorry for the late answer, but here it goes. I had to modify the script to compress the file while writing it, otherwise simple commands like would not work due to the file-size without compression. It is strange that other people didn't found the same issue. I am using a simple Samba share on a Synology, only from the Venus OS I cannot browse that folder. Anyway, here what I did to solve the issue, in your code, I simply changed a single line to use gzip, e.g.: /bin/dd if=/dev/mmcblk0 of="${BACKUP_PATH}/${BACKUP_NAME}_$(date +%Y%m%d_%H%M%S).img" bs=1MB status=progress /bin/dd if=/dev/mmcblk0 bs=1MB status=progress | gzip > "${BACKUP_PATH}/${BACKUP_NAME}_$(date +%Y%m%d_%H%M%S).img.gz" You can see the original line (commented). Hope that is fine for you.

Thanks for the follow-up request.