Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4794

Advanced users • Re: Image File Utilities

$
0
0
I am trying to send myself an e-mail with the final lines of the image-backup output as visible in the terminal, the one with the 6 or 7 steps at the end and final remarks. I want to see if everything went well in the cronjob for a weekly backup of my pi image. I am only interested in the last 30 log-lines or so, just to conrim that the backup was succesfully created and resized.

Everthing works well, except for the fact that the log file does not contain the final lines with the steps, resizing info and so on. I guess this is because they're more like a comment to the rsync backup process? How can I get this (image-backup) info in the log?

Below is my command (part of a script that has BACKUP_FILE and LOGFILE as variables, needless to say) to start the image-backup and to create the logfile. I tried appending 2>&1 but that obviously doesn't work in this setting.

sudo image-backup -i $BACKUP_FILE,, --options --progress,--log-file=$LOGFILE

Perhaps someone can show me the right direction, that would be much appreciated.

How about?:

Code:

sudo image-backup -i $BACKUP_FILE,, --options --progress &> $LOGFILE
BAM! That's it. Thank you so much RonR!

Statistics: Posted by tigo711 — Sun Jan 05, 2025 9:55 pm



Viewing all articles
Browse latest Browse all 4794

Trending Articles