Question about Backup

Hello,
in the directory /var/backup and /var/univention-backup a lot of files are stored. Especially in the 2. directory it never seems to be deleted.
Which of these files can be safely deleted, and which should be deleted?

Does anyone have experience or suggestions?

Thomas

hi thhoe, I had the same issue ages ago… in the end I mounted a filestore over NFS with gigabit links and multiple TB of disk space. They are mounted as /var/backup and /var/univention-backup.

Here is what i did for /var/univention-backup. You can expand on this easily for anything

root@ucs1:~# cat /etc/fstab
# /etc/fstab: static file system information.

(mounts trimmed out for simplicity)
10.10.100.10:/srv/data/export/NFS/ucs1/var/univention-backup /var/univention-backup nfs rsize=8192,wsize=8192,timeo=14,intr
root@ucs2:~# cat /etc/fstab
# /etc/fstab: static file system information.

(mounts trimmed out for simplicity)
10.10.100.10:/srv/data/export/NFS/ucs2/var/univention-backup /var/univention-backup nfs rsize=8192,wsize=8192,timeo=14,intr
root@ucs2:~#

on the NFS server

root@drbd2:/srv/data/primary/cron# cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
(other exports trimmed out for simplicity)

/srv/data/export/NFS/ucs1       ucs1.sgvfr.lan(rw,no_subtree_check)
/srv/data/export/NFS/ucs2       ucs2.sgvfr.lan(rw,no_subtree_check)
root@drbd2:/srv/data/primary/cron#

.
.
.
To limit the amount of storage /var/univention-backup can consume change your registry settings here.
image

Here i have only specified 2 backups retained on the NFS server… however that server is also backed up off-site using rsync and keeps 10 days of data with some fancy scripting. /etc /srv and /var are exact copies of the current folders, each backup folder is a copy from that day… purged automatically when the nightly cron runs on the NFS server to the external storage server.

total 60
drwxr-xr-x 15 root root 4096 Nov 23 03:30 ./
drwxr-xr-x  3 root root 4096 May 18  2019 ../
drwxr-xr-x  3 root root 4096 Nov 14 03:30 backup_2019-11-14/
drwxr-xr-x  3 root root 4096 Nov 15 03:30 backup_2019-11-15/
drwxr-xr-x  3 root root 4096 Nov 16 03:30 backup_2019-11-16/
drwxr-xr-x  3 root root 4096 Nov 17 03:30 backup_2019-11-17/
drwxr-xr-x  3 root root 4096 Nov 18 03:30 backup_2019-11-18/
drwxr-xr-x  3 root root 4096 Nov 19 03:30 backup_2019-11-19/
drwxr-xr-x  3 root root 4096 Nov 20 03:30 backup_2019-11-20/
drwxr-xr-x  3 root root 4096 Nov 21 03:30 backup_2019-11-21/
drwxr-xr-x  3 root root 4096 Nov 22 03:30 backup_2019-11-22/
drwxr-xr-x  3 root root 4096 Nov 23 03:30 backup_2019-11-23/
drwxr-xr-x  4 root root 4096 Aug 16 12:16 etc/
drwxr-xr-x  3 root root 4096 Feb 25  2017 srv/
drwxr-xr-x  3 root root 4096 Mar 15  2018 var/

Hope that helps.

edit: interesting, i also see my offsite backups are stale. i’ll have to look at that. good thing you asked your question or I would never have known.
:slight_smile: :upside_down_face:

2nd edit: no they aren’t… folder creation dates… they are current…

Hello sgvfr,
Thank you so much for your answer.

I only connect my NAS to the backup, at the end ‘umount’ takes place.

I didn’t know those settings. This helps.

I’m also working on a Nagios check for the backup. At the moment the backup has to be tested first.

Thomas

Mastodon