I updated to DietPi 6.2 and attempted to run DietPi-Sync this evening in an SSH session, however DietPi-Sync appears to be stuck, or is it just no longer displaying what it's doing? I need to confirm what files are being copied when doing a manual sync. Is this no longer possible? All I'm seeing is something similar to this:
[ SUB1 ] DietPi-Sync > sync
[ ... ] DietPi-Sync | Running command: rsync -avP4 --delete --log-file=/var/log/dietpi-sync.log --exclude-from=/tmp/.dietpi-sync_exclude --include-from=/tmp/.dietpi-sync_include /mnt/Server_Media/ /mnt/Server_Backup/
V6.2 -- DietPi-Sync Behaving Differently?
-
- Posts: 54
- Joined: Mon Dec 26, 2016 7:54 am
Re: V6.2 -- DietPi-Sync Behaving Differently?
Hi midnightwatcher,
jep we switched the rsync command into our error handled G_RUN_CMD. This means that there is no output on screen, just in case of an error you will see an error message, showing necessary information and the last lines of the commands output, that high likely are related to the error.
However, you can always review the verbose output of the last sync at /var/log/dietpi-sync.log, for dietpi-backup it's dietpi-backup.log.
Generally, if you see the moving dot in the front, this means a command is running within our error handled functions. The output from the actual command is redirected to /tmp/G_ERROR_HANDLER_COMMAND and can be always reviewed there, only showing up on screen, is an actual error occurred, in ready for github copy&paste way
. With this we also try to reduce (unnecessary?) terminal output, showing what is interesting and preserving an overview over what is going on (especially within long dietpi-software installations, we felt, this might be beneficial), but always enabling to review more details, if necessary. Feedback on how and where we solved this good/bad is welcome! Work on this is still in progress.
jep we switched the rsync command into our error handled G_RUN_CMD. This means that there is no output on screen, just in case of an error you will see an error message, showing necessary information and the last lines of the commands output, that high likely are related to the error.
However, you can always review the verbose output of the last sync at /var/log/dietpi-sync.log, for dietpi-backup it's dietpi-backup.log.
Generally, if you see the moving dot in the front, this means a command is running within our error handled functions. The output from the actual command is redirected to /tmp/G_ERROR_HANDLER_COMMAND and can be always reviewed there, only showing up on screen, is an actual error occurred, in ready for github copy&paste way

-
- Posts: 54
- Joined: Mon Dec 26, 2016 7:54 am
Re: V6.2 -- DietPi-Sync Behaving Differently?
Thank you for the reply, Michalng. This feels like a step back, however. I prefer to do a dry run first, but even that no longer tells me what's going on and having to then navigate to a log file when doing a sync via SSH seems to be a bit of a hassle when compared to the old way. If we cannot revert back to a real-time verbose/output, is there a way we can easily view the DietPi-Sync log file from within DietPi-Sync itself? If not, can that option be added?
Re: V6.2 -- DietPi-Sync Behaving Differently?
Thanks for the feedback.midnightwatcher wrote:Thank you for the reply, Michalng. This feels like a step back, however. I prefer to do a dry run first, but even that no longer tells me what's going on and having to then navigate to a log file when doing a sync via SSH seems to be a bit of a hassle when compared to the old way.
I'll review this, see if we can improve.
EDIT: MichaIng has already covered most of this, but I had a quick look.
Ok, so currently, only the end result is shown (with status of success of failure). We essentially wanted to reduce the onscreen print during dietpi-backup and dietpi-sync, and, allow our global error system to handle errors more efficiently.
Code: Select all
#Sync
G_RUN_CMD rsync $rync_options --log-file=$LOGFILE --exclude-from="$FP_EXCLUDE_GLOBAL" --include-from="$FP_INCLUDE_GLOBAL" "$FP_SOURCE"/ "$FP_TARGET"/
echo -e "Sync completed: $(date +"%d-%m-%Y_%H%M")" >> "$FP_TARGET/$SYNC_STATS_FILENAME"
#Menu
if (( $G_USER_INPUTS )); then
if (( $SYNC_DRY_RUN == 0 )); then
whiptail --title "Sync completed" --msgbox "$FP_SOURCE\n\nHas been synced to:\n$FP_TARGET\n\nLog file: $LOGFILE" --backtitle "$WHIP_BACKTITLE" 13 60
else
whiptail --title "Dry Run Sync completed" --msgbox "$FP_SOURCE\n\nHas been synced with a Dry Run (NO modifications) to:\n$FP_TARGET\n\nLog file: $LOGFILE" --backtitle "$WHIP_BACKTITLE" 13 60
fi
fi
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: V6.2 -- DietPi-Sync Behaving Differently?
@MichaIng
Maybe a solution here is we could implement:
And have a prompt inside the global to ask user if they would like to view the logfile, then display it?
I'll take a crack at this one
https://github.com/Fourdee/DietPi/issues/1546
Maybe a solution here is we could implement:
Code: Select all
G_WHIP_VIEWLOG /log/file.log
I'll take a crack at this one

https://github.com/Fourdee/DietPi/issues/1546
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
-
- Posts: 54
- Joined: Mon Dec 26, 2016 7:54 am
Re: V6.2 -- DietPi-Sync Behaving Differently?
Thank you, Fourdee, that would be a reasonable compromise. Would this also prompt the user to view the log after a dry run?
Re: V6.2 -- DietPi-Sync Behaving Differently?
Yepmidnightwatcher wrote:Would this also prompt the user to view the log after a dry run?

Will make it for v6.3 update, we'll try to keep this update small, so we can aim release within 1 week.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
-
- Posts: 54
- Joined: Mon Dec 26, 2016 7:54 am
Re: V6.2 -- DietPi-Sync Behaving Differently?
Excellent. One final question - - Will there be a way to identify how many MB/s files are being copied/synced like the previous version?
Re: V6.2 -- DietPi-Sync Behaving Differently?
Possible would be also to allow users setting verbose mode in sync/backup config. I guess most (at least me) don't need logs and that way we can skip whiptail question every time, which can be also not answered if run by cron job e.g.
I guess the size of transferred data is part of verbose rsync?
I guess the size of transferred data is part of verbose rsync?
Re: V6.2 -- DietPi-Sync Behaving Differently?
Yep, contained at end of logfile.MichaIng wrote:I guess the size of transferred data is part of verbose rsync?
Yep, good idea.Possible would be also to allow users setting verbose mode in sync/backup config. I guess most (at least me) don't need logs and that way we can skip whiptail question every time, which can be also not answered if run by cron job e.g.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.