Hi, I tried your backup script right now for the first - many thanks for it! Of course, I have no old backup on the mounted drive. I got the following output:
root@raspberrypi2:~# /data/etc/raspberry-pi-backup/backup.sh
Mounting "//XXXXXXXX/backup" to "/mnt/backup"...
Creating "venus/" on backup mount...
Using script dd for backup.
15804000000 bytes (16 GB, 15 GiB) copied, 1343 s, 11.8 MB/s
15812+1 records in
15812+1 records out
15812526080 bytes (16 GB, 15 GiB) copied, 1354.37 s, 11.7 MB/s
Backup completed successfully.
head: invalid number '-5'
ls: /mnt/backup/venus/raspberrypi2/Backup_raspberrypi2_20231106_182638.img: Value too large for defined data type
It's clear that this comes from the line
BACKUP_FILES_TO_DELETE_COUNT=$(ls -tr ${BACKUP_PATH}/${BACKUP_NAME}* | head -n -${BACKUP_COUNT} | wc -l)
Hi, I tried your backup script right now for the first - many thanks for it! Of course, I have no old backup on the mounted drive. I got the following output:
It's clear that this comes from the line
but I have no idea why.