How to backup USB boot drive

Ask questions about Arch Linux ARM. Please search before making a new topic.

How to backup USB boot drive

Postby psychokiller » Wed May 06, 2020 6:00 pm

Hi all,
I have a few appliances around the house based on Arch Linux ARM (dockstars, now a zyxel nsa325) and I would like to make them safe to USB wear issues.

All of them boot from USB pendrives and those are doomed to fail, one day or another, it is not a matter of IF but WHEN, we all know this here right?

So the question is: what is the best strategy to have a second pendrive in every box that constantly mirrors (even daily, not necessarily continuously) the boot drive and can be swapped and boot from it if the first one fails?
- LVM snapshots?
- any obscure sync utility like, as an example rsnapshot?
- a simple dd from boot drive to the second drive in a cron job?

How can consistency be guaranteed?

Anyone willing to suggest how to approach this issue will have may eternal gratitude, and maybe even a more tangible reward ;-)

TIA, Paolo
psychokiller
 
Posts: 40
Joined: Tue Sep 15, 2015 5:39 pm

Re: How to backup USB boot drive

Postby summers » Wed May 06, 2020 8:47 pm

Use cron and rsync. Rsync will just copy the differences, so it will save ware on the usb. Also see it you can make regularly written directories as tmpfs, so they only get written to ram and not to flash/usb.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: How to backup USB boot drive

Postby psychokiller » Tue May 12, 2020 6:12 pm

I am still looking for a good solution: the real problem with rsync is consistency.
Everything read/write and open might be corrupted... or maybe not?
Have to check how rsync handles open files.
Paolo
psychokiller
 
Posts: 40
Joined: Tue Sep 15, 2015 5:39 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 13 guests