tags:

views:

205

answers:

3

Hi, I'm working on a custom version of a GNU/Linux live distribution. I need to add/remove packages, edit scripts... I work in an unsquashed filesystem (squashfs-root/) used as root for chroot. I'm wondering which is the best way to manage my work. Should I create a git repo and add squashfs-root/? My main fear is messing up chroot env and cannot go back to a working version. Thanks, hamen

UPDATE: I'll give a try to rdiff-backup. Thank you.

+1  A: 

Automate everything you do and just version the scripts you use to create your distribution. That way you can always re-create your distribution in case you messed something up.

Bombe
Scenario: current live distro has 2.6.26 kernel. I mount squashfs-root, choroot it, install 2.6.29 kernel sources, recompile kernel, add new kernel to squashfs-root, compress squashfs-root, build .iso.How to handle this? :-/
hamen
@hamen: Write a script which contains the very same commands which you type on the command line.
Aaron Digulla
A: 

git would work for that, it's useful as TimeMachine/System Restore. I use it like that for my /etc dir. If it's small enough, you could push it to github, and use it as a backup and distribution mechanism.

Maximiliano Guzman
+2  A: 

The problem with git (and other source control suites) is that it doesn't handle permissions and special files very well.

etckeeper is a set of scripts on top of git to manage /etc. That can already provide you with much security.

Finally, you say you're running from a chroot(). This would allow you easy backups from outside of the chroot, e.g. with rdiff-backup, which creates nice compact on-disk representation while still allowing you to browse the most recent version directly.

David Schmitt
Actually I thought to manual backups, but squashfs-root/ is 1.3G. Has rdiff-backup some "folder yesterday snapshot" feature?
hamen