• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

de/H03-May-2022-880773

es/H03-May-2022-875764

fr/H03-May-2022-885774

nl/H03-May-2022-892781

po4a/H01-Jul-2018-6,6905,988

pt/H01-Jul-2018-880768

sv/H03-May-2022-871760

Makefile.amH A D01-Jul-2018621 288

Makefile.inH A D01-Jul-201822 KiB740638

README.savingH A D01-Jul-20182.7 KiB7156

faked.1H A D03-May-20222.2 KiB9585

fakeroot.1H A D03-May-20229 KiB301286

README.saving

1The fakeroot environment can be saved for later use if you use the -s
2option to fakeroot. This will not work perfectly, however.
3
4Internally, faked keeps track of all files which have had operations
5done on them that the user would not normally be able to do, in order to
6fake the effect later.
7
8For example, if you create a device node, faked will actually create an
9empty file, but remember that it was a device node (along with the
10relevant details) so that if you subsequently do an "ls -l", you'll see
11it as a device node.
12
13The save option simply saves this list, so later fakeroot invocations
14can restore them.
15
16However, you can manipulate the files saved outside of the fakeroot
17environment (for example, you could delete the zero-length file that was
18the placeholder for the device node) and fakeroot will not know about it
19when it loads up the list again. This will cause the list to leak.
20
21The list cannot easily be verified, either, because it keys things by
22inode number, and there is no mechanism to look up anything from one of
23those alone. Such verification _could_ be done, but would in theory
24require a search through the _entire_ filesystem, every time. This isn't
25really acceptable for regular operation, and I don't need such a feature
26so I haven't written it. The file format is fairly straightforward and
27obvious, however, so if anybody else wants to...  :-)
28
29So, this feature should only be used if you limit everything you do
30inside the fakeroot environment to the fakeroot environment. This is
31still useful - for example (assuming you have the appropriate key):
32
33$ fakeroot -s backup.environ
34# mkdir backup
35# cd backup
36# export RSYNC_RSH=ssh
37# rsync -a root@important.example.com:/ .
38[...]
39# exit
40$
41
42Now, "fakeroot -i backup.environ" will get you exactly what you had
43backed up, user and group information, device nodes and everything. Of
44course, that information is still faked, but you should be able to
45happily rsync it back. This way you only need normal user privileges on
46the backup machine. This is great to back up multiple machines without a
47compromise affecting the backup machine and thereby compromising all the
48other machines you back up as well.
49
50Note that further rsync updates should be done with:
51
52$ fakeroot -i backup.environ -s backup.environ
53# cd backup
54# export RSYNC_RSH=ssh
55# rsync -a root@important.example.com:/ .
56[...]
57# exit
58$
59
60so that further changes are still saved.
61
62In this scenario, the shortcoming will not affect anything, as the only
63modification of files which required root (and consequently were faked)
64is done inside the environment, and can therefore be tracked and saved.
65
66Have fun!
67
68Robie Basak <robie@principle.co.uk>
69Northern Principle Limited
7025/3/2003.
71