Merge remote-tracking branch 'origin/github/pr/45'
[grml.org.git] / docs / config-framework-4.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
5  <TITLE>grml - config-framework: Scripts</TITLE>
6  <LINK HREF="config-framework-5.html" REL=next>
7  <LINK HREF="config-framework-3.html" REL=previous>
8  <LINK HREF="config-framework.html#toc4" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="config-framework-5.html">Next</A>
12 <A HREF="config-framework-3.html">Previous</A>
13 <A HREF="config-framework.html#toc4">Contents</A>
14 <HR>
15 <H2><A NAME="s4">4.</A> <A HREF="config-framework.html#toc4">Scripts</A></H2>
16
17 <H2><A NAME="ss4.1">4.1</A> <A HREF="config-framework.html#toc4.1">save-config - save configuration</A>
18 </H2>
19
20
21 <P>Calling the script 'save-config' without any further options will start
22 the script in interactive mode. If any of the following options are
23 provided on command line, save-config will run in non-interactive mode.
24 The following options are supported for specifying which parts should be
25 saved in the configuration file:</P>
26 <P>
27 <BLOCKQUOTE><CODE>
28 <HR>
29 <PRE>
30  -home              =>    save modified hidden files in $HOME (that's: '.*')
31  -etc               =>    save modified files from directory /etc
32  -configdir         =>    save complete directory $HOME/config
33  -all               =>    save /etc, $HOME/.*, $HOME/config and unionfs-snapshot
34 </PRE>
35 <HR>
36 </CODE></BLOCKQUOTE>
37 </P>
38 <P>By default the configuration file will be generated and stored in the
39 current directory. The following options are supported for specifying
40 another destination of the configuration file:</P>
41 <P>
42 <BLOCKQUOTE><CODE>
43 <HR>
44 <PRE>
45  -file foo_bar_config.tbz               =>    save configuration in specified file
46  -mail user@example.com                 =>    send configuration via e-mail
47  -ssh [user@]remotehost:/path/to/file/  =>    ssh/scp configuration
48 </PRE>
49 <HR>
50 </CODE></BLOCKQUOTE>
51 </P>
52
53 <H2><A NAME="ss4.2">4.2</A> <A HREF="config-framework.html#toc4.2">restore-config - restore configuration</A>
54 </H2>
55
56
57 <P>It is not only possible to restore a configuration 
58 <A HREF="config-framework-5.html#bootoptions">via bootoptions</A> but also via a script namend 'restore-config'.
59 This script exists to restore a specific configuration saved via
60 'save-config'. Just specify the name of the archive which should be
61 extracted as argument to restore-config.</P>
62 <P>
63 <BLOCKQUOTE><CODE>
64 <HR>
65 <PRE>
66  -home              =>    extract only /home
67  -etc               =>    extract only /etc
68  -configdir         =>    extract only $HOME/config
69 </PRE>
70 <HR>
71 </CODE></BLOCKQUOTE>
72 </P>
73 <P>Usage examples: 'restore-config config.tbz' restores config.tbz.
74 'restore-config -etc foobar.tbz' restores only /etc from configuration
75 archive foobar.tbz.</P>
76
77 <H2><A NAME="ss4.3">4.3</A> <A HREF="config-framework.html#toc4.3">mkpersistenthome - use persistent home-directory</A>
78 </H2>
79
80
81 <P>You have a local partition you would like to use as your home-directory?
82 Just use the interactive script called 'mkpersistenthome'. It will
83 either create a file namend grml.img on the specified partition or
84 create a ext2-partition. grml.img is a loopback device, you can specify
85 its size manually. it is possible to scan through the partitions to
86 identify the appropriate partition. To use the home-directory when
87 booting grml specify the appropriate bootoption on bootprompt:</P>
88 <P>
89 <BLOCKQUOTE><CODE>
90 <HR>
91 <PRE>
92  home=/dev/hda3    =>   use /dev/hda3 as the homepartition
93  home=scan         =>   scan through the available partitions and search
94                         for file grml.img
95 </PRE>
96 <HR>
97 </CODE></BLOCKQUOTE>
98 </P>
99
100 <HR>
101 <A HREF="config-framework-5.html">Next</A>
102 <A HREF="config-framework-3.html">Previous</A>
103 <A HREF="config-framework.html#toc4">Contents</A>
104 </BODY>
105 </HTML>