xbianonpi / xbian

XBMC on Raspberry Pi, Bleeding Edge
https://xbian.org
GNU General Public License v3.0
294 stars 44 forks source link

Add install-option or xconfig-screen for copying and swapping to USB-disk/stick installation. #180

Closed BartOtten closed 10 years ago

BartOtten commented 11 years ago

In my experience there are less corruption-trouble while using an USB-disk/stick. Maybe XBian can get an easy transfer option somewhere. Post 1.0 though

eth0izzle commented 11 years ago

FYI I wrote a quick guide here if anybody is interested in running from USB: http://www.ifc0nfig.com/running-xbian-from-a-usb-hard-drive/

Koenkk commented 11 years ago

@eth0izzle :+1:

CurlyMoo commented 11 years ago

Our linux is a good start for this functionality.

BartOtten commented 11 years ago

I think it should go into XBian-config too, so it can share all code with 'Live Backup'. As it is essentialy the same. Just an easy rsync command (+ changing /boot/cmdline.txt)

BartOtten commented 11 years ago

Idea: As for backup, let's write the current time after installation completed (after time has been set). That way we can keep track of modified files and only backup those. Once the backup completes, rewrite the time. And so on and so forth.

Big advantage:

For restore you can provide 2 options:

I think that would be enough options ;)

CurlyMoo commented 11 years ago

rsync is by default incremental ;) so no need to do any fancy things. I personally prefer rdiff-backup. I use that tool at home.

BartOtten commented 11 years ago

Curly: Problem is that it will sync it all the first boot.


CURRENTTIME=$(date +%s);
DATETIME=$(date +%Y%b%d-%Hh%Mm);
FILENAME="xbian_${DATETIME}.tar.gz";

find /home/ -cnewer /home/xbian/.backuptime -type f > /backup/filelist_${DATETIME};

mkdir -p /backup;
chown -R xbian /backup;

tar -zcvnPf /backup/${FILENAME} -T /backup/filelist_${DATETIME};

touch /home/xbian/.backuptime;
exit 0;

Steal the idea (wink) and make something of it....After the release of A4

CurlyMoo commented 11 years ago

Don't understand what you're trying to say here.

BartOtten commented 11 years ago

rsync will make a full backup before it goes incremental afaik. So the first backup will be as big as the whole installation. This solution (for testing purposes only /home but for / it will be the same) will only backup files that are modified after the installation. And after that, it will keep making 'new archives' with modified files. This means I can rollback to the configurationfile from 3 backups ago.

Try the script, you'll see what I mean :P

CurlyMoo commented 11 years ago

rsync can of course also, only backup specific folders/files...

BartOtten commented 11 years ago

I understand. But can it backup only those file who are modified without a full backup first?

This is the first backup I made after installing: xbian@xbian:/backup# cat /backup/filelist_2012Dec27-11h58m /home/xbian/.xbmc/temp/xbmc.log /home/xbian/.xbmc/userdata/profiles.xml /home/xbian/.xbmc/userdata/guisettings.xml /home/xbian/.xbmc/userdata/upnpserver.xml

Those are the only files I modified so if I want to go back to the state of the system at this point I can 1.) install XBian fresh (only needed if it's ruined) 2.) unpack the tar

The filesize is so small it can be send over the network with ease. It would be even better if you can give a description so you can keep track of the content of the backup.

Using it, happy with it :) No more full dd backups and no 600mb backup-directory of rsync

CurlyMoo commented 11 years ago

You always need an initial backup in order to do an incremental one.

BartOtten commented 11 years ago

Curlymo: only if you want to save only the parts of a file that have been modificated. However, I save the whole file so the 'original' is not needed at all. I just want the files that have been modificated AFTER .backuptime (set by XBian after setup is completed)

So if the installer stops at 12:30 and I backup at 13:30...I will only backup the files that have been modificated in the last hour :D

BartOtten commented 11 years ago

The install image is the initial backup ;) Don't need those files twice at my drive. If I need them, I can download them.

CurlyMoo commented 11 years ago

Try to build it into xbian-config.

BartOtten commented 11 years ago

Once I am done with the website you mean? :) It would be nice if you could make an example file with many comments for some 'usual routines'.....

CurlyMoo commented 11 years ago

Thats up to you ;)

The password modules are pretty simple and can act as a decent example at this point.

dn4hc commented 11 years ago

So will this be available in alpha 5?

CurlyMoo commented 11 years ago

No, the FP also states Post 1.0 though. And we still hope @BartOtten can write this.

BartOtten commented 11 years ago

Getting better at bash but probably post 1.0 indeed

CurlyMoo commented 11 years ago

I will have a better tutorial on how xbian-config works by then.

dn4hc commented 11 years ago

No worries, Followed the FAQ for now.

mk01 commented 11 years ago

final solution with zero maintenance during future changes / new hardware is to utilize the network storage the same way IBM wanted in year 1974.

network account and network home. all standard platforms are keeping open standards (ldap / hfs) and even if it takes one day to setup accounting each future new setup / change / restore is nothing more like reinstall clean os. and most of the time does not matter platform (mac / linux / bsd / ios).

everywhere you just install xbmc and you log ito your account (with accessible home or replicated home) is again the same xbmc.

of course makes no sense if you have one device to have prepared for crash, but if there are three, four. is very very comfortable.

CurlyMoo commented 11 years ago

I don't understand a bit :smile:

mk01 commented 10 years ago

Part of Beta2.