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:
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.
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?
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.
#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
The menus after command is completed, also mentions the logfile location /var/log/dietpi-sync.log, which contains verbose rsync operation, if required by end user.
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?
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.
Hi gentlemen, I updated to version 6.3 and did a dry run of DietPi-Sync. When it completed it had asked if I wanted to view the log, however when I clicked OK was unable to see any details. I’m using JuiceSSH on my Nexus 6P phone.
Hi Fourdee, I see that 6.4 is now available and attempted to update, however now I am receiving an error stating that “Available free space on RootFS is low (0 MB)” and that I need to free up at least 500 MB of space. I’m surprised by this since the Z83 has a 32GB eMMC.
Thanks Fourdee, I think I found the problem. It looks like DietPi-Sync tried to backup one of my external drives locally, will report back later this evening …
Update: Confirmed. I’ve deleted the offending directory and updated to 6.4 without issue. I’ve also now properly mounted my drives using their UUID in fstab and did a bit of cleaning up to ensure I don’t have a repeat of the same issue.