Safely move /var/log?

I currently have /var/log in it’s own btrfs subvolume, and I’d like to change it to be managed by impermanence instead.

The part I don’t understand is the actual moving of the logs. If I just enable Impermanence and reboot, I’ll get new logs at the new location, but the old ones will be separate. I doubt I can move the logs while the system is running, right?

What is the best way to move the logs location so I don’t lose them?

I guess it would be an option if you boot from a live cd, use nixos-enter to chroot into your existing NixOS, make fileSystems changes and nixos-rebuild there

1 Like