raspberry-pi-backup icon indicating copy to clipboard operation
raspberry-pi-backup copied to clipboard

"ls" error in the end of the script

Open ruildias opened this issue 1 year ago • 4 comments
trafficstars

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. "

ruildias avatar Apr 09 '24 09:04 ruildias

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

mr-manuel avatar Apr 09 '24 09:04 mr-manuel

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:

  • Created a small file in the same folder: "teste.txt"

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

ruildias avatar Apr 09 '24 10:04 ruildias

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 avatar Apr 30 '24 08:04 mr-manuel

@ruildias any update?

mr-manuel avatar May 16 '24 11:05 mr-manuel

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.

ruildias avatar May 31 '24 15:05 ruildias