You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably not the best way to achieve this but I have created a systemd timer and service to automatically trim all NextBackup files, keeping a fixed amount (24 per day, 7 days = 168).
nextbackup-trim.timer
[Unit]
Description=Run NEXTBACKUP-TRIM hourly and on boot
[Timer]
OnBootSec=15min
OnUnitActiveSec=1hr
[Install]
WantedBy=timers.target
nextbackup-trim.service
[Unit]
Description=Trim the number of NextBackup backups
[Service]
Type=oneshot
ExecStart=/bin/bash -c "find /mnt/ncdata/ownbackup/ -maxdepth 1 -mindepth 1 -type d | tail -n +168 | xargs -n 1 rm -rf"
Create both files under /etc/systemd/system/ (ubuntu).
Start and enable the timer
Probably not the best way to achieve this but I have created a systemd timer and service to automatically trim all NextBackup files, keeping a fixed amount (24 per day, 7 days = 168).
nextbackup-trim.timer
nextbackup-trim.service
Create both files under /etc/systemd/system/ (ubuntu).
Start and enable the timer
sudo systemctl start nextbackup-trim.timer sudo systemctl enable nextbackup-trim.timer
The text was updated successfully, but these errors were encountered: