Question about backups and storage space

Hello all,

I have a Rasp 1 with a 16GB SD card, DietPi v7.3.2 and PiHole.

  1. 4.7GB of used space? Just by DietPi, PiHole and a backup?
  2. before each update I create a backup on the SD card. Is this file always overwritten with a new version?
  3. what is the easiest way to get the backup from the SD card? To an extra USB stick or via my network to my Windows PC? I am still a beginner with Linux commands and Putty.

Thank you very much!
space.png

Hi,

let’s check for larges files on your system. This way we will see where your space is gone

du -a / | sort -n -r | head -n 20

Easiest way to store the backup on an USB stick would be to create the backup directly on it. Just connect the USB stick and have it mounted using dietpi-drive_manager. Once done use the new location of your USB stick as backup target in dietpi-backup.
There is no need to copy the existing backup. Just create a new one and delete the old backup.

Thanks Joulinar

The first 4 paths were not found.

I will then simply store it on a USB stick.
Recommendation on the easiest way to delete the old backup? Change to /mnt/dietpi-backup and delete?

Greetings
path.png

the first 4 lines are totally fine. Just ignore them.

to delete the old backup, just do

rm -Rf /mnt/dietpi-backup

Next to this you have around 700MB of PiHole database file. This is because PiHole stores 365 days of logs. We recently changed the default setting and logging duration for the database-wise DNS query log in /etc/pihole/pihole-FTL.db is reduced from 365 days down to 2 days. But it is impoacting new installations only. Personally I don’t see the need to keep a year of DNS query logs and adjusted my system as well. Now, the file is around 20MB :slight_smile:

You can verify settings as follow

cat /etc/pihole/pihole-FTL.conf

Hey Joulinar
Thanks for your help, I had a lot to do the last weeks, so I only got to my Rasp tasks now.

I have now parked the backups on a USB stick. But I had to format it with XFS before. :slight_smile:

root@DietPi:~# du -a / | sort -n -r | head -n 20
du: Zugriff auf '/proc/6938/task/6938/fd/3' nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf '/proc/6938/task/6938/fdinfo/3' nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf '/proc/6938/fd/4' nicht möglich: Datei oder Verzeichnis nicht gefunden
du: Zugriff auf '/proc/6938/fdinfo/4' nicht möglich: Datei oder Verzeichnis nicht gefunden
5340763 /
1807696 /mnt
1807652 /mnt/usbstick/dietpi-backup
1807652 /mnt/usbstick
1807648 /mnt/usbstick/dietpi-backup/data
1751192 /var
1606660 /var/swap
936864  /etc
935248  /mnt/usbstick/dietpi-backup/data/etc
929808  /etc/pihole
929516  /mnt/usbstick/dietpi-backup/data/etc/pihole
886704  /etc/pihole/pihole-FTL.db
886632  /mnt/usbstick/dietpi-backup/data/etc/pihole/pihole-FTL.db
390512  /lib
384800  /mnt/usbstick/dietpi-backup/data/lib
374372  /usr
367568  /mnt/usbstick/dietpi-backup/data/usr
266008  /lib/modules
260956  /mnt/usbstick/dietpi-backup/data/lib/modules
160388  /usr/lib
root@DietPi:~#

Any idea what I can do here? Wanna change the my DNS query log.

root@DietPi:~# cat /etc/pihole/pihole-FTL.conf
BLOCKINGMODE=IP-NODATA-AAAA
PRIVACYLEVEL=0

Are there any recommendations regarding the CPU performance? I have a Rasp1 for PiHole only. Minimum 300Mhz, Max 700 Hz, I have set conservative.

 Architecture |     armv6l
 Temperature  |     56'C : 132'F (Running warm, but safe)
 Governor     |     conservative
 Throttle up  |     50% CPU usage

                 Current Freq    Min Freq   Max Freq
 CPU0         |      700 MHz      700 MHz    700 MHz

[ INFO ] DietPi-CPU_info | CPU current frequency, may be affected by this script, due to the processing required to run it.








Thanks and greetings :slight_smile:

Any idea what I can do here? Wanna change the my DNS query log.

what exactly you like to do? Usually queries are stored in PiHole database.

If you like to check for biggest files, I would recommend to exclude your USB stick as follow

u -a / --exclude /mnt/usbstick | sort -n -r | head -n 20

This should give a better view on space used.

CPU settings should be fine. Usually PiHole did not require that much resource.

Hey Joulinar

I wanted to limit the logs from 365 days to ten days, as mentioned by you above, but then I get the following message

root@DietPi:~# cat /etc/pihole/pihole-FTL.conf
BLOCKINGMODE=IP-NODATA-AAAA
PRIVACYLEVEL=0

Thanks for your patience, send the days again a small donation to your team :slight_smile:

you would need add value MAXDBDAYS=10 into /etc/pihole/pihole-FTL.conf and restart the service.

as well can you execute following again

du -a / --exclude /mnt/usbstick | sort -n -r | head -n 20

sudo nano /etc/pihole/pihole-FTL.conf :heavy_check_mark:
MAXDBDAYS=10 :heavy_check_mark:

The old logs I have to delete probably first? does that work via the dashboard and flush logs? Joulinar

3441299 /
1657484 /var
1606660 /var/swap
940932  /etc
933876  /etc/pihole
890772  /etc/pihole/pihole-FTL.db
390512  /lib
374372  /usr
266008  /lib/modules
160388  /usr/lib
157500  /usr/share
94680   /usr/lib/arm-linux-gnueabihf
85600   /lib/firmware
83364   /lib/modules/5.10.60-v8+
80936   /lib/modules/5.10.60-v8+/kernel
61976   /lib/modules/5.10.60-v7l+
61292   /lib/modules/5.10.60-v7+
59564   /lib/modules/5.10.60-v7l+/kernel
59372   /lib/modules/5.10.60+
58940   /lib/modules/5.10.60-v7+/kernel

Simply stop service pihole-FTL.conf and delete database file /etc/pihole/pihole-FTL.db. Restarting the service will recreate the file automatically.

Btw: nowadays DietPi will use 2 days retention time for logs on new installation.