SOLVED Backing up SSD System to HDD data set

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
Hi
Having recently reconfigured my setup such that system, boot and logs are all now on an SSD, I would naturally like to make a backup of the SSD to the mirrored HDDs that provide the main backup facility on the server. However, when I try 'Replication' I find no way to address the system data set as the source. Same with Snapshots. Same with Rsync. What's the best (only?) way to go about this, and is there anything to bear in mind in this endeavour?

Thank you in advance.
 
Last edited:

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
why? save your configation, thats all you need to restore it. the boot drive is, ultimately, expendable.
if your system is dead, and your backup is on the system...how does that help you?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
why? save your configation, thats all you need to restore it. the boot drive is, ultimately, expendable.
if your system is dead, and your backup is on the system...how does that help you?

The laggy forum ate my answer but this was essentially it.
 

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
nom nom, forum are hangry.
 

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
the "system dataset" is not the same thing as the boot pool. it lives in an available pool, usually the first, but can be moved, and can be replicated, but as its mainly legacy or temporary stuff, loosing it doesnt really mean much. it needs to exist but Im pretty sure its throw-away stuff

now, if you were wanting to ask how to automatically backup your configuration, that's a different question, and very valid.
and an answer would be "copy /data/freenas-v1.db somwhere safe. it wont have your passwords or something, but it has everything else.
you should ALWAYS do a save config before updating or making major changes (updating prompts you to save the config)
 

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
"copy /data/freenas-v1.db somwhere safe. it wont have your passwords or something, but it has everything else.
So thank you for that, but a few questions of detail if I may:
* Is the content of that location the exact same thing as a config file, minus the system password?
* Could I set up some automation to copy it somewhere regularly?
* On a home system with no great resources, I'm wondering where to copy it to. Assuming the configuration file is on the SSD (system, boot & logs) then the only place to back it up would be to those HDDs (my data). If I'm wrong and it's actually stored on the data drive, then the reverse - could I back it up to the SSD? And for good measure, is backing it up via Samba to Windows a sane option?
* Lastly, your path mentions 'freenas'. I'm using TrueNAS. Is the path as given anyway? (I'm not near the machine to check currently).
Thanks!
 

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
Is the content of that location the exact same thing as a config file, minus the system password?
this is the config file itself.
Could I set up some automation to copy it somewhere regularly?
absolutely
On a home system with no great resources, I'm wondering where to copy it to. Assuming the configuration file is on the SSD (system, boot & logs) then the only place to back it up would be to those HDDs (my data). If I'm wrong and it's actually stored on the data drive, then the reverse
it's not even 1 MB in size, copy it pretty much anywhere. it's basically a text file with the instructions on how the system is setup. you can store like a years worth in a USB stick. you do need it on a local system, however: if the only copy is ON the NAS, you cannot get to the copy to restore from it, but you need to restore from it before you can get a copy of it....
could I back it up to the SSD? And for good measure, is backing it up via Samba to Windows a sane option?
it's already on the SSD, since you said that's your boot drive. save it somewhere that ISNT on the system its a backup of. put it in google docs, or email it to yourself, save it to your laptop/desktop/raspberrypi, rsync it somewhere, use proton drive. its just a text file, it doesn't matter where you put it, it just matters that you put it somewhere you can find it. and get it when the original system doesn't work.
Lastly, your path mentions 'freenas'. I'm using TrueNAS. Is the path as given anyway? (I'm not near the machine to check currently).
ahhh. it looks like the file is called freenas, even on truenas. the name of the file doesn't really matter.
 

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Look at https://github.com/Spearfoot
Useful scripts to do lots of things there - specifically a script that emails a copy of the config. Then use cron from the GUI to run this daily
 
Top