balena-os / takeover

Migrate arbitrary devices to balena
12 stars 8 forks source link

Copy additional files required to keep identity when migrating from balenaOS to balenaOS #99

Open rahul-thakoor opened 3 weeks ago

rahul-thakoor commented 3 weeks ago

As part of looking into #97 , I saw that balenahup(https://github.com/balena-os/balenahup/tree/master) has a conf file that copied additional files

balenahup-rootfs-overlay

https://github.com/balena-os/balenahup/blob/3ebe331b016a4fd7fdb183ef5ecf3081b376daf6/app/conf/resinhup.conf#L48

to_keep_files:
    /etc/dropbear/dropbear_rsa_host_key
    /etc/machine-id
    /etc/supervisor.conf
    /var/lib/systemd/random-seed
    /var/lib/urandom/random-seed:/var/lib/systemd/random-seed
    /var/lib/dropbear/authorized_keys
    /var/lib/connman

Right now takeover only certain files as part of migration info. #66 added other files such as system-proxy files (see commit)

Ideally, we should keep the additional files similar to balenahup