Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Backup /etc/fstab as extra file #16
For simplification of a restore, I'd like to request that every backup type should copy the /etc/fstab file as an extra file into the backup directory as plain text file.
I've noticed that especially "Windows" guys (that also involves me) have troubles to recover the mounts to re-access the backup volume in case of a restore (or at least it is time consuming to figure out the settings).
it shouldn't be a big deal for me to implement your request. But first I want to get the rational for the request. Maybe I have another solution handy
Looks like you want to provide some information to the Windows user so he knows how he can mount the partitions restored on the SD card for further editing of some restored files. Why should a user want to do this? A restore should be an exact copy of the original system and not modified at all. Maybe you can give me an example.
As I have understood, a restore under Raspbian looks like this:
Number 1 can be managed easily as this is a standard routine.
Therefore, the most difficult part is remounting the backup volume, as everyone will have forgotten how it was configured long time ago.
I just have finished the first part of my WebUI for LoxBerry, to ad hoc run and schedule backups by webinterface.
BTW, it is meant as feature request for future versions. Possibly you get out some other ideas how to more automate restores. I've read about the automatic image restorer script, but had not found more documentation about it. That are great news!
Thank you very much for the update. I now see the usecase: A Windows user who primed the Raspberry with LoxBerry, just runs it and has no Linux experience should get detailed instructions how to restore the backup on his Raspberry. That's very useful because in general a user is quite nervous when the SD card broke and he has to restore the backup. I love this idea.
Do you plan to parse /etc/fstab to generate a script or to provide detailed steps how to mount the backup partition? Actually this assumes the backup partition is mounted in /etc/fstab which may not be true in all environments. But if you document this requirement appropriately it should work
I followed your link to LoxBerryBackup and it looks pretty good.
Frankly I don't like to add the copy function of /etc/fstab into raspiBackup which will pollute raspiBackup with special requirement code. But I think it's a nice idea to add another extensionpoint to raspiBackup which is called just before the backup with dd, tar or rsync is started. The target backup directory will be available as a bash variable and can be used to do everything you want. You only have to provide a small bash script which copies /etc/fstab to the backup directory
The plugin/extension is a good idea, as I cannot know the backup path outside.
As "my" LoxBerry user usually sits in front of a Windows PC and web browser, parsing the fstab from users upload is really a good idea! (assuming the user can access the file from a share, e.g. NAS).
My restore concept for LoxBerry image would be:
Thanks for your inspiration!
in the config file to enable the sample extension.
Please test whether this works for you.
This solution fulfills my expectation! Thanks