Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
17.1 Legacy Series
»
Are backups of "volatile" files required on reboots for non-nano installs?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Are backups of "volatile" files required on reboots for non-nano installs? (Read 4387 times)
deviantintegral
Newbie
Posts: 31
Karma: 1
Are backups of "volatile" files required on reboots for non-nano installs?
«
on:
May 21, 2017, 02:35:43 am »
I have OPNsense installed on a 16GB SSD. I noticed that reboots were taking a long time. It turns out the culprit was the netflow database; gzip'ing was taking 5-10 minutes, blocking a reboot.
This commit illustrates the code
fairly well. Any reason I can't just comment them out?
Logged
franco
Administrator
Hero Member
Posts: 17657
Karma: 1611
Re: Are backups of "volatile" files required on reboots for non-nano installs?
«
Reply #1 on:
May 22, 2017, 07:51:45 am »
Hi there,
If you comment this out, the database will be reset on each reboot. Your database must be rather large?
We could remove the compression (it's the "z" argument for both compress and extract). It's faster but may wear down a flash-based storage faster.
The question since the hardware used (especially /var RAM-FS) does not match with the amount of data collected:
Do you expect the database to be restored after boot?
If not, we could also make the backup on reboot optional.
Cheers,
Franco
Logged
deviantintegral
Newbie
Posts: 31
Karma: 1
Re: Are backups of "volatile" files required on reboots for non-nano installs?
«
Reply #2 on:
May 24, 2017, 03:09:45 pm »
Well, at one point, the disk (16GB) actually filled up completely with netflow data and I had to manually clear it out. I haven't replicated that. /var doesn't look to be RAM mounted, which is why I don't see why there needs to be a backup and restore process at all.
Logged
franco
Administrator
Hero Member
Posts: 17657
Karma: 1611
Re: Are backups of "volatile" files required on reboots for non-nano installs?
«
Reply #3 on:
May 25, 2017, 01:15:11 pm »
It's not entirely correct. If we don't back up the files on a reboot they can't be imported by the installer into a new installation. But in general you are right, so we just need to find a way to remove them and let the importer do its work still.
https://github.com/opnsense/core/issues/1654
Thinking about it, there is a second issue where a reboot backup/restore protects against file corruption through power outages...
Cheers,
Franco
«
Last Edit: May 25, 2017, 01:16:47 pm by franco
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
17.1 Legacy Series
»
Are backups of "volatile" files required on reboots for non-nano installs?