DietPi-Sync, No Daily Sync. Weekly is enough

Hello I wanted to ask if it is possible to set the cronjob or synchronization to once a week? And if so, how can i do that?


not with our standard configuration as we have configured dietpi-sync directly within /etc/cron.daily/dietpi

You would need to create an own cronjob or a custom script within /etc/cron.weekly/

Hello, ive created a Bash-script which called “samba” and put it in the /etc/cron.weekly/ path


# Variablen definieren

# Samba-Laufwerk mounten
echo "Mounting SMB drive..."
sudo mount -t cifs $SMB_DRIVE $LOCAL_MOUNT_POINT -o user='UserName',password='Password'

# Ordner im Samba-Laufwerk syncronisieren
echo "sync SMB drive to local folder"
rsync -avzh --delete --log-file=/mnt/to/samba_copy.log /mnt/samba/path/to/copied/folder /mnt/to/folder

# Samba-Laufwerk unmounten
echo "Unmounting SMB drive..."
sudo umount $LOCAL_MOUNT_POINT

echo "Done!"

i have adjusted the time with dietpi-cron. however, nothing happens at the specified time.
(i know i could have saved the above information by re-entering the paths under rsync. this was due to different versions of the script)

I think you could just use dietpi-sync 1 instead of the rsync command. It will sync then with the settings your made earlier with dietpi-sync.

What kind of logging to you use? The RAM-log or persistent log? You could have a look into your logs (if you have persistent logging) what happend, if the job started etc.
grep CRON /var/log/syslog