# /var/backups question



## freescottsthoughts (Jun 30, 2017)

Is it safe to delete 2-7 of the sql backups?  trying to free up space in /var

Here is what is listed

total 10004
-rw-r--r--  1 root  wheel     1690 Oct 14  2014 aliases.bak
-rw-r--r--  1 root  wheel      489 Apr  8  2016 group.bak
-rw-r--r--  1 root  wheel      469 Apr  5  2016 group.bak2
-rw-------  1 root  wheel     2055 Apr  8  2016 master.passwd.bak
-rw-------  1 root  wheel     1894 Apr  5  2016 master.passwd.bak2
-rw-r--r--  1 root  wheel  1218476 Jun 30 03:22 pkg.sql.xz
-rw-r--r--  1 root  wheel  1218476 Jun 29 03:57 pkg.sql.xz.1
-rw-r--r--  1 root  wheel  1218476 Jun 28 03:26 pkg.sql.xz.2
-rw-r--r--  1 root  wheel  1218476 Jun 27 04:11 pkg.sql.xz.3
-rw-r--r--  1 root  wheel  1218476 Jun 26 03:39 pkg.sql.xz.4
-rw-r--r--  1 root  wheel  1218476 Jun 25 03:12 pkg.sql.xz.5
-rw-r--r--  1 root  wheel  1218476 Jun 24 03:11 pkg.sql.xz.6
-rw-r--r--  1 root  wheel  1218476 Jun 23 03:34 pkg.sql.xz.7

Thanks for anyone input in advance.


----------



## julp (Jul 1, 2017)

Hi,

yes, as long as you don't need them. These are backups from pkg(ng) of its local packages database created by pkg-backup run by periodic (see /usr/local/etc/periodic/411.pkg-backup). So, if you delete them, they might be recreated.

No more than 7 (default) backups will be kept, so it should not fulfill your filesystem. To limit them or get rid of them, you can redefine `daily_backup_pkg_count=N` to keep at most _N_ of them or disable those backups (`daily_backup_pkg_enable="NO"`) in /etc/periodic.conf (or /etc/periodic.conf.local).

FYI, kind of same idea for the *.bak files (periodic /etc/periodic/daily/2*0.backup-* tasks).


----------

