Solved RPi2 - backing up
#1
I know you can take the .kodi folder or do a backup that is loadable in another fresh install of kodi on another microsd card, but what I want to know is if I can take this perfectly optimised and functioning build of kodi with skin, xml edits, etc and back it up entirely in a way that can be easily placed on or flashed to another microsd card later should this card die. I've spent days finally getting myself back to a perfect kodi setup after my last microsd card died and I don't want to have to go through all this again. Any options here?
Thanks!
Reply
#2
There is always the option of making an image copy of your current sd card to a file, and/or to a 2nd identical sd card.

If you have LibreELEC running, there is a Backup/Restore section in the LibreELEC Settings Add-on.
If you have a different OS running on the RPi, please mention it.
Reply
#3
(2018-01-16, 21:16)Klojum Wrote: There is always the option of making an image copy of your current sd card to a file, and/or to a 2nd identical sd card.

If you have LibreELEC running, there is a Backup/Restore section in the LibreELEC Settings Add-on.
If you have a different OS running on the RPi, please mention it.
But with imaging the microsd card, isn't it in a format that Windows doesn't recognise? I seem to remember trying to plug cards with kodi builds on them and Windows not seeing it an wanting to format it.
It is LibreElec I have, yes. But doing that backup requires me to create a LibreElec install again on a new card, and then restore the backup. I want something where I can just flash a perfect image to a phone. I'm asking if that is doable.
Reply
#4
With Win32diskimager you can read and write images, aka make image backups of your SD card. Images are big blobs, so it's not the same as copying files. So you/Windows also cannot read/write individual files within that image blob. An sd card image will produce a file with the same size as the sd card, as the image is a uncompressed mirror image on bit level.

LibreELEC's backup uses the tar command to create compressed files of the .kodi/ , .config/ and .cache/ folders, it does not do the system files because those are on a different partition. So it is a different kind of backup. LibreELEC's backup compresses the files within said folders, which usually results in a much smaller backup file.

It's up to you what works best for you.
Reply
#5
(2018-01-16, 21:45)Klojum Wrote: With Win32diskimager you can read and write images, aka make image backups of your SD card. Images are big blobs, so it's not the same as copying files. So you/Windows also cannot read/write individual files within that image blob. An sd card image will produce a file with the same size as the sd card, as the image is a uncompressed mirror image on bit level.

LibreELEC's backup uses the tar command to create compressed files of the .kodi/ , .config/ and .cache/ folders, it does not do the system files because those are on a different partition. So it is a different kind of backup. LibreELEC's backup compresses the files within said folders, which usually results in a much smaller backup file.

It's up to you what works best for you.
Yeah, exactly. I know how images work it's just sometimes on forums I say "image file" and people think I'm talking about a jpeg or something. I want something where this image file of this perfect build just sits on my hdd so that when this card dies like the last one did, I can just flash the image to a new microsd card and GO. How will I flash that image then? With Win32diskimager again?
Reply
#6
win32diskimager will do that.  I use that or usbit for imaging sd cards / usb sticks.
Reply
#7
Be aware that similar-sized sd cards are not all actually the same size... A couple less or more sectors can make a difference.
I prefer to use identical (same manufacturer, same size) sd cards when it comes to such backups.
Reply
#8
(2018-01-16, 22:12)Klojum Wrote: Be aware that similar-sized sd cards are not all actually the same size... A couple less or more sectors can make a difference.
I prefer to use identical (same manufacturer, same size) sd cards when it comes to such backups.
I leave a few MB free at the end of a storage partition to get around that - usbit has an option to truncate writes, so an image can still be written to a marginally smaller card.  No good if you're backing up an existing card, obviously.
Reply
#9
Hmm.. So what do you guys think is the best way to do this, given that you can't ever be sure the model of card you use (Samsung EVO, in this case) will be available when you need it again in several months/years time?
Reply
#10
Belt and braces.
1.  Image the card with win32diskimager.  In the worst case you can always restore to a bigger card.
2.  Make a backup using libreelec's built-in backup function.  Move that to your pc.
Either of the above will work.  Neither takes much effort.
Reply
#11
I wouldn't stop at one single backup. Sure you can make a SD card image. On a PC, you don't make an image of your HDD/SSD every week, but a backup of important data is done weekly, in some cases daily.

I would do a 'simple' LibreELEC backup once a month, so all the cached thumbs and databases are up-to-date in the backups as well.
And keep those backup files somewhere safe. Meaning, NOT on your LibreELEC sd card... Smile
Reply
#12
(2018-01-16, 23:19)Klojum Wrote: I wouldn't stop at one single backup. Sure you can make a SD card image. On a PC, you don't make an image of your HDD/SSD every week, but a backup of important data is done weekly, in some cases daily.

I would do a 'simple' LibreELEC backup once a month, so all the cached thumbs and databases are up-to-date in the backups as well.
And keep those backup files somewhere safe. Meaning, NOT on your LibreELEC sd card... Smile
Well, I DO do backups of my PC, but only the storage media hdd I have (audio, video) I keep three of those. For the OS I have one clean backup of a Win10 system that's ready to go from scratch should I ever need it.
I don't really need backups of the thumbs and other elements for the Rpi Kodi system, just the UI settings. The reason for this is that I don't allow Kodi to optimise anything for me. I pretty much have everything off in that sense. I only use it literally to SMB into my desktop on the home network. I don't like any of that images, show info, film info stuff. For the kinds of things I watch no online database ever gets them right. It just becaomes a mess of badly sourced incorrect metadata. So, anyway, long story short, while I only have settings and menus to backup I have done a lot of xml tweaking that I don't want to have to do again.
Reply
#13
Thanks guys, I did both backups. Bit confusing that ImageWriter doesn't tell you it's backing up to "Downloads". It would be cool if that could be changed.
You guys have saved me a lot of time in the future, thank you!!
Reply
#14
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
RPi2 - backing up0