Quote:
Originally Posted by taumuco
I have en extra Raspberry Pi that should be used for testing various Ubuntu stuff in the future. But I would like to have it purely as a test machine, so that it for example is reset every week or something like that.
Is it possible to reset a distro, basically making it a fresh install every week? For example a script from another computer.
Or is it more advisable to create a docker image for this purpose and then reset it every week?
Or some other setup?
|
Easy enough to do simply make a backup of it when installed copying the files to a safe location, once needing reset copy them back. Though for the amount of time it takes you may as well just have two sdcards both imaged with a fresh setup install just keep them in rotation and image the one taken out with the new install for the next time you do it. This spare card could be done with files copied from the backup I mention earlier then you do not have to do the initial setup all over again. The way these things boot is so simple that a copy of the files from one place to the other works without problem, no messing with grub or any of that foolishness. You just need to make sure the partitions have the proper LABEL names or that is the way it works with Debian. This is how I backup my SSD I boot a spare machine and then use scp for the /boot partition and rsync for the / and copy it over the network from the running machine, shutdown the Pi attach the second SSD and boot to confirm it worked. Then I do my upgrades on the newly attached drive knowing I have working backup to boot from if it fails during the upgrade, I do it for every major upgrade not the tiny little packages, the kernel and firmware upgrades are the ones it gets done for. Of course if there have been none of them for a while I will do a copy just to have up to date backup sitting around. Just pick your method and stick with it and as always test the method to make sure it works every time you do it. In my case this means shutting down the Pi attaching the freshly done drive and booting to confirm it worked as it has ever time I do it since the first time I confirmed my method.