[Q] Dietpi backup

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
neno20st
Posts: 11
Joined: Sun Jan 27, 2019 3:23 pm

[Q] Dietpi backup

Post by neno20st »

Hi

I want to backup my dietpi. I got RPI3 and my Diet pi is on USB. I have 16gb sd card mounted and formated as ext4. I also have external disk with media files mounted on USB if that mean something.

After running dietpi-backup and set location of backup on SD card i got message "the target location appears to have insufficient free space to successfully finish the backup. Would you like to override this warning and continue wuth the backup?"

I see my USB stick where is Dietpi is 32GB and have free space 29GB. So 3 GB need to be backup. Why this warning? What to do?
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: [Q] Dietpi backup

Post by MichaIng »

Hmm, the required drive space is estimated by a dry run and then add drive block size once for each file. If this is then larger than free space on target (minus existing backup in case), then the warning appears.

If the target SDcard really has 16G free space, then no chance that the block size addition can be the reason, unless you have billions of tiny byte-sized files.

There was one other case where this appeared due to a single corrupted very large file: viewtopic.php?f=9&t=5444
The file size there has wrong value due to fs corruption. The problem is that the backup indeed writes this size with meaningless data to the target until it's full. I had this once myself on SDcard, as well within the kernel modules directory, where one file would have been several Exabyte size. Perhaps a certain RPi kernel update shipped a broken file or the update method caused file corruption in some cases, not sure.

Above the warning prompt there should have been a size estimation print in terminal. Can you see and copy&paste this to see how large DietPi-Backup expects the required disk space?
You can try to ignore. But if it takes more than e.g. 5 minutes, please cancel/interrupt and check /var/log/dietpi-backup.log. The last line should then contain the file that is too large due to corruption or at least the directory where this file is inside. So we can investigate and see if it's safe to simply remove it.

Just one question:
- Why you place the backup onto an SDcard? This is no recommended, as SDcards to not survive long when regularly writing much data on them.
- If you already have an external HDD/SDD then I would recommend to use this instead.
neno20st
Posts: 11
Joined: Sun Jan 27, 2019 3:23 pm

Re: [Q] Dietpi backup

Post by neno20st »

Thanks on answer. First why i use sd card. Simple reason is that i only have sd card and i want to first make a test backup. external disk is full with media and i won't to use it for backup because it was ntfs filesystem.

Is possible that dietpi backup want to make whole backup including my external disk media files? Will that be reason for warning message?
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: [Q] Dietpi backup

Post by MichaIng »

External drives mounted to /mnt should be excluded, besides /mnt/dietpi_userdata. Ah hmm, did you move userdata to an external drive? In this case you should add the large data dirs inside (e.g. Videos/Music and such) to the exclusion list from within dietpi-backup menu.

For simplicity we added dietpi_userdata by default to the backup, also because databases and some software binaries+data are stored there. But the downside is indeed that this includes large downloads, media libraries, cloud data and such, depending on what you installed.
neno20st
Posts: 11
Joined: Sun Jan 27, 2019 3:23 pm

Re: [Q] Dietpi backup

Post by neno20st »

yes, userdata is moved to an external drive. That's key
Post Reply