However I would point out that imaging any filesystem with dd that is mounted read/write is not going to be reliable (this applies to raspbmc too) - the image file will have some subtle corruption in it that you may not notice until you really need your backup - you are taking a snapshot of a filesystem that is not in a consistent state. (Some data may be still cached in memory and not yet written out to disk - the state of the filesystem will most likely change between the time when dd started and finished causing inconsistencies etc)
Many thanks both of you.
I’m not wedded to any particular method of taking backups, and I’m a linux noob. Is there a recommended backup method that doesn’t involve turning everything off and removing the card?
The simple answer is, you cannot make an image of a mounted disk. You could .tar up the /home/osmc/.kodi/ folder and copy it off to a network location. This gives you the ability to make a fresh install and then restore all your kodi settings.
“/mnt/…” is the mounted flash drive/dir where the rsync’d data goes to. Setup cron to run the script about 3 times daily. Restore by rsyncing in the opposite direction:
Are these all the directories that osmc and kodi uses? If I use git to backup these directories and pushed the changes out to my other units would it keep all my add-ons and profile settings?
I setup git to sync the /boot /etc /home and /usr directories. I am able to push changes out to my other units and any new addons or shortcut changes show up on those units as expected. The only problem I have right now is whenever I go to the home screen the skin builder runs and generates an error. Any clue as to why that may be happening? I can provide log files if needed.
Rsync and Git are two completely different things. Git is a version control system, Rsync is for syncing defined sets of files and folders between two or more different machines automatically.
I don’t really understand why you would choose Git to sync configuration between multiple machines, that’s like using a screwdriver to hammer in nails.
@DBMandrake
Thank you for the insight. I am still very new to all of this so
sorry for any silly questions. What I would like to accomplish is being
able to make changes on my main rpi2/osmc (ie. change shortcut menus
and/or install an addons) and then be able to push those changes out to
other units across the internet (ie. my office and parents units). I
also have Retrosmc setup and would like to be able to push any changes
for that as well (ie. new roms and/or saved games).
I was thinking I might be able to do this with Git/GitHub but
apparently I thought wrong. I’m now looking into rclone which is
suppose to be rsync for cloud storage.
@sam_nazarko I will also look into aufs. Thank you Sam for the suggestion.