LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-03-2021, 04:57 AM   #1
taumuco
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Rep: Reputation: Disabled
Ubuntu on Raspberry Pi for testing - Is it possible to automatically reset the distro every week


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?
 
Old 11-03-2021, 08:20 AM   #2
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,161

Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
Use lvm and snapshot when built. Then just roll back the snapshot whenever you want to? Is what I do before an upgrade. Just snapshot it. Worst case I can roll it right back.
 
Old 11-03-2021, 10:33 AM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by taumuco View Post
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.
 
Old 11-03-2021, 10:58 AM   #4
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,416

Rep: Reputation: 564Reputation: 564Reputation: 564Reputation: 564Reputation: 564Reputation: 564
Timeshift is a useful app for taking snapshots.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Raspberry Pi: Combine a Raspberry Pi with up to 4 Raspberry Pi Zeros for less than US$50 with the Cluster HAT LXer Syndicated Linux News 0 07-05-2019 12:03 PM
LXer: Raspberry Pi Foundation: We'll Ship the 250,000th Raspberry Pi Zero W This Week LXer Syndicated Linux News 0 05-04-2017 05:05 PM
[SOLVED] Date n time reset on every login on Ubuntu 10.04. katharnakh Linux - Desktop 3 09-15-2010 09:24 AM
Ubuntu gnome settings reset after every reboot Zac Matthew Joseph Linux - Newbie 3 04-04-2010 09:43 PM
How to set up a Cron Job to run every other week or every three months etc. kckabobus Linux - Newbie 3 04-03-2008 01:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration