Quick Start
From flud
This page serves to document flud backup's current state (see Release Notes 0.1.0), and the methods used to get it going. It is hoped that most of this will be simplified-away at some point.
Note that as of today (Nov, 2007), there is no public flŭd network. In other words, you can only backup data to computers under your own control, or under the control of personal acquaintences. We will push to instantiate a public flŭd network after the turning on the trust and fairness mechanisms, due during release 0.0.3 or 0.0.4.
Contents |
[edit] Getting Started
Get packages from [1]. If you install via rpm or debian repositories, dependencies are handled automatically.
> fludnode
starts up a node. This must run as long as you want to use the flud backup service. (If this were not the first node in your flud network, you would also provide the ip/host and port of another node, e.g., 'fludnode 1.2.3.4 8080').
> fludclient
gives you a fully-featured graphical interface for selecting files to backup and restore (see screenshots here). Backup of files selected in the GUI will not occur unless fludscheduler is also running.
> fludscheduler
monitors your filesystem for changes, and issues commands to fludnode to perform backup operations.
> fludlocalclient
gives you a rudimentary command-line interface. You may 'putf <filename>', 'getf <filename>', 'putm' to store the mastermetadata, and 'getm' to restore the mastermetadata. You can also type 'list' to get a list of all stored files, 'nodes' to get a list of known nodes, and 'buck' to get a dump of the DHT routing tables. You may type 'help' to get a list of these, and other, commands. 'fludlocalclient' can backup files without fludscheduler running concurrently.
[edit] Example 1
In this example, we will create an emulated flud network of 40 nodes.
$ start-fludnodes 40
After a moment, 40 nodes will be running locally. To get a view of what they are doing, run:
$ gauges-fludnodes ~/.flud 1-40
In another terminal, start a FludScheduler to backup selected files:
$ FLUDHOME=~/.flud1 fludscheduler
In another terminal, we can run a client to connect to one of these nodes:
$ FLUDHOME=~/.flud1 fludclient
Select a file for backup in this window, then press ctrl-shft-F to force an immediate flush of your selections to disk. FludScheduler should notice them after a few seconds, and begin a backup. You can watch data being stored to the 40 nodes in the gauges panel you started up previously. You can also test restore functionality on the restore panel.
[edit] Example 2
This is similar to the above example, but with finer-grained control over nodes and more visibility into the emulated flud network via commandline tools.
Let's run three flud nodes:
$ fludnode flud node listening on port 8080
starts the first node and prints its port number. We can use this info to start the next node. In another terminal, type:
$ FLUDHOME=~/.flud1 fludnode localhost 8080 8081 flud node connected and listenting on port 8081
The above command tells flud to use ~/.flud1 as its home directory (if FLUDHOME is not set, ~/.flud is used), to use 8081 as its own port, and to try to contact a node at localhost:8080 for bootstrapping.
$ FLUDHOME=~/.flud2 fludnode localhost 8080 8082 flud node connected and listenting on port 8082
Starts the third node.
Now that we have a couple of nodes, we can connect a client and start doing operations:
$ FLUDHOME=~/.flud1 fludlocalclient connecting to localhost:8081 [<Thread(PoolThread--1212623700-1, started)>] Mon Jul 17 23:21:23 2006>
You can now enter 'putf <filename>' commands to store files, 'getf <filename>' commands to retrieve files, 'putm' command to store master metadata, and 'getm' command to restore master metadata. Type 'help' to get info on other commands.
[edit] Running FludNode as a daemon
In the previous example, we ran FludNodes in the foreground. You can also run FludNodes as background services by using the twistd program:
twistd -oy `tacpath-flud`
To specify a port other than the default and a different FLUDHOME directory:
FLUDHOME=~/.flud1 FLUDPORT=8081 twistd -oy `tacpath-flud`
To specify a gateway host and port:
FLUDGWHOST=localhost FLUDGWPORT=8081 FLUDHOME=~/.flud2 FLUDPORT=8082 twistd -oy `tacpath-flud`
You may also need to give twistd a --pidfile and --logfile option, so that multiple instances don't collide. See start-fludnodes for examples.