[Kea-users] Proper Backup and Restore Procedure
Darren Ankney
darren.ankney at gmail.com
Fri Dec 20 11:50:07 UTC 2024
Hi Jonas,
I don't think there is an exact procedure endorsed by ISC. However,
these .csv files are maintained in such a way as to minimize the
potential loss of data from unexpected power loss or similar. If you
are moving Kea service to a new machine and want to copy your leases
over, the easiest thing to do is to shut down Kea on the existing
server so that no new leases are allocated, then copy all of the .csv
files (not just one of them) so that you have all of the leases (the
.2 file is a result of the LFC process and will not have all leases in
it). Then start Kea on the new machine and continue with the
migration. Kea will read the leases and continue from the same state
as the old machine (assuming a very similar configuration between the
two machines). There could be other concerns such as server
identifiers and the like, but these should work out on their own over
time.
Thank you,
Darren Ankney
On Thu, Dec 19, 2024 at 9:02 AM Jonas Alfredsson via Kea-users
<kea-users at lists.isc.org> wrote:
>
> Hi,
>
> I have a question regarding the proper method of performing a backup+restore
> operation on Kea when using the memfile.
>
> For ease of conversation we define the following config:
> "lease-database": {
> "type": "memfile",
> "name": "/kea/leases/dhcp4.csv",
> "lfc-interval": 3600
> }
>
> From my investigation regarding how Kea handles the leases file I came across
> the design document for [kea-lfc][1], where it appears it will create a file called
> "/kea/leases/dhcp4.csv.2" when done. This file then contains the current cleaned
> up state of the DHCP service. The main dhcp4.csv file is then just the journal
> with differences from the last time the .2 file was created.
>
> My question is then, is it enough to just copy this .2 file, and place it in at
> "/kea/leases/dhcp4.csv.2" in the new machine to have it pick up from where the
> old server were when this file was created, or is there another procedure that is
> endorsed by ISC?
>
> Best regards,
> Jonas
>
> [1]: https://gitlab.isc.org/isc-projects/kea/-/wikis/designs/Lease-File-Cleanup-design
>
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
More information about the Kea-users
mailing list