Forum
Xbian backup feature - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Community (/forum-5.html)
+--- Forum: Feedback (/forum-12.html)
+--- Thread: Xbian backup feature (/thread-1794.html)



Xbian backup feature - Naif1992 - 22nd Nov, 2013 01:25 AM

I love the Xbian back up feature as it backs up all my settings, add-ons, and metadata. However, I think it's not going to be helpful in case of an SD card corruption because the backed up data is saved on the SD card. That defeats the purpose of a back-up in case of an emergency. So I think you should allow users to choose back-up path and backup frequency. For example, I have my Raspberry Pi connected to my network HDD's 24/7. So if you allowed my to choose one of my HDD's as a backup destination and allow me to have Xbian automatically back up every 24 hours, I would never lose my data as it is saved on both my HDD and my Raspberry Pi.

Anyways, this is just a small issue compared to your great software. I really love it. I've been looking around for a long time for a media player that can organize my huge library. And a combination of Xbian and Raspberry Pi is the perfect thing for that.

Again, thank you very very very much for the software and I hope you keep improving it!


RE: Xbian backup feature - IriDium - 22nd Nov, 2013 01:46 AM

The backup feature in Beta 2 (I guess that is what you are on) expects you to physically remove the backup image. Either with a HDD, FLASH drive or via SMB to a PC.

However, it would be usefull to have that facility.


RE: Xbian backup feature - Naif1992 - 22nd Nov, 2013 03:03 AM

Yes, I'm on Beta 2. How can I move the IMG file through SMB? By using the file manager?

Another question, does the back up produce one .IMG file or does it produce hundreds of small files?


RE: Xbian backup feature - IriDium - 22nd Nov, 2013 03:15 AM

@Naif1992 If you are on Windoze - Go to network and the shares should be there Xbian-Backup. OSX Finder -> Go -> Connect to server -> Xbian-backup.

Just copy the file to your local machine.

It creates a single .gz (Compressed image) file which when you want to restore, you just "slip" it into the "put_here_to_restore" folder and it's restored.


RE: Xbian backup feature - f1vefour - 26th Nov, 2013 07:36 AM

btsync is a nice solution for keeping your data mirrored on external sources, or boxfs


RE: Xbian backup feature - mk01 - 1st Dec, 2013 11:48 AM

(22nd Nov, 2013 01:25 AM)Naif1992 Wrote:  However, I think it's not going to be helpful in case of an SD card corruption because the backed up data is saved on the SD card. That defeats the purpose of a back-up in case of an emergency. So I think you should allow users to choose back-up path and backup frequency. For example, I have my Raspberry Pi connected to my network HDD's 24/7.

the initial release of "backuphome" function was targeted more to users with one single RPI installation and a PC without 24/7 running NAS or PC with huge storage. that's why there is no scheduler for this one and there is no user selectable destination.

user is expected to start the backuphome function and browse for the created file from win/linux/macosx/others.

if one has a server / nas solution, more effective solution would be centralized XBMC setup with most of .xbmc content shared over network and SQL hosted library - which allows you easy restore, all the time the same settings / looks / library over all XBMC devices (RPI and PC in your case. so you configure one and just install XBMC on others with no extra configuration/setup redundant work for other installations.

or one can always schedule complete .img file creation with "xbiancopy" function (including user selectable target location being local folder, remote folder (mounted locally), local block device). it will create on img file completely preconfigured for re-flash to sdcard and start (it will create boot partition on the img file, properly configure boot and cmdfile settings).

this doesn't mean we won't implement this for backuphome function, if there is demand for it.

btw: you can to this yourself very easily.
1) create file /etc/cron.daily/backuphome-scheduled, do a chmod +x /etc/cron.daily/backuphome-scheduled
2) inside the file put:
Code:
#!/bin/sh

exec  >/dev/null 2>&1

dest=/mnt/mounted.network.folder
# set to yes if you want to remove old backups
rmold=no

btrfs-auto-snapshot backuphome
if [ -n "$(find /xbmc-backup -iname \*.img.gz)" ]; then
   [ $rmold = yes ] && mv "$dest/*.img.gz" "$dest/*.img.gz_delete"
   if mv /xbmc-backup/*.img.gz "$dest"; then
      rm -f "$dest/*.img.gz_delete"
   else
      mv "$dest/*.img.gz_delete" "$dest/*.img.gz"
   fi
fi

that's done


RE: Xbian backup feature - wassy - 23rd Feb, 2014 01:13 AM

@mk01 - That was a really useful script, thank-you. I was able to set this up and now have logrotate on the server that backups get copied to regularly rotating and deleting old backups every 30 days.

I know its probably overkill seeing as all the unique information is held within the /home directory, but I notice there is also the "Xbian-copy" feature in the config that allows you to create an online image of all SD card filesystems. Is there a script somewhere that I can call/modify to perform this via command line just like the /home backup, or would I need to create my own?

What I'd like to do is periodically create a full SD card image and save it to my smb mount like the "disc-copy" feature in the xbian config. But like most linux geeks, I want to automate it so I can add it to cron.monthly and forget about it.

Thanks


RE: Xbian backup feature - mk01 - 7th Mar, 2014 02:18 PM

wassy,

this is all integrated into btrfs-auto-snapshot. xbian-config (CLI or XBMC) are always just wrappers to btrfs-auto-snapshot's functions.

in case of img file creation syntax is:

Code:
btrfs-auto-snapshot xbiancopy --img /dev/root /media/mount/file.img

this will create bootable image. so /boot 64mb in size + your rootfs.

although I just red bug report that since some update target file has zero size, so looking into it now.


RE: Xbian backup feature - Senseohasser - 15th Feb, 2015 02:52 AM

How long does the restore take? I have copied the img file of an old backup into the folder and the file name was changed from .img ro .img.working

And now? How do I know the restore is finished?

And one more question: Can I use a gotham backup to restore the settings on a kodi installation?


RE: Xbian backup feature - Exnor - 19th Feb, 2015 01:00 AM

(7th Mar, 2014 02:18 PM)mk01 Wrote:  wassy,

this is all integrated into btrfs-auto-snapshot. xbian-config (CLI or XBMC) are always just wrappers to btrfs-auto-snapshot's functions.

in case of img file creation syntax is:

Code:
btrfs-auto-snapshot xbiancopy --img /dev/root /media/mount/file.img

this will create bootable image. so /boot 64mb in size + your rootfs.

although I just red bug report that since some update target file has zero size, so looking into it now.

Maybe a little off topic, but is there any way i can use the backup (via xbian-config on Kodi) function to write the back up file or img to a network share? That would be really helpful.

thks


RE: Xbian backup feature - sibaroochi - 13th Mar, 2015 02:00 PM

(26th Nov, 2013 07:36 AM)f1vefour Wrote:  btsync is a nice solution for keeping your data mirrored on external sources, or boxfs

I've loaded xbian onto a Raspberry Pi 2 and wanted to install BTsync. I have limited knowledge of linux. How can I boot to a desktop in order to install btsync?


RE: Xbian backup feature - IIIdefconIII - 21st Mar, 2015 02:03 AM

(13th Mar, 2015 02:00 PM)sibaroochi Wrote:  
(26th Nov, 2013 07:36 AM)f1vefour Wrote:  btsync is a nice solution for keeping your data mirrored on external sources, or boxfs

I've loaded xbian onto a Raspberry Pi 2 and wanted to install BTsync. I have limited knowledge of linux. How can I boot to a desktop in order to install btsync?

does this works if im going from a 8 gb to a 32? or do i need to reinstall xbain?