]> arthur.barton.de Git - bup.git/blob - Documentation/bup-on.md
README: replace du code example's tab prefix with spaces
[bup.git] / Documentation / bup-on.md
1 % bup-on(1) Bup %BUP_VERSION%
2 % Avery Pennarun <apenwarr@gmail.com>
3 % %BUP_DATE%
4
5 # NAME
6
7 bup-on - run a bup server locally and client remotely
8
9 # SYNOPSIS
10
11 bup on \<hostname\> index ...
12
13 bup on \<hostname\> save ...
14
15 bup on \<hostname\> split ...
16
17
18 # DESCRIPTION
19
20 `bup on` runs the given bup command on the given host using
21 ssh.  It runs a bup server on the local machine, so that
22 commands like `bup save` on the remote machine can back up
23 to the local machine.  (You don't need to provide a
24 `--remote` option to `bup save` in order for this to work.)
25
26 See `bup-index`(1), `bup-save`(1), and so on for details of
27 how each subcommand works.
28
29 This 'reverse mode' operation is useful when the machine
30 being backed up isn't supposed to be able to ssh into the
31 backup server.  For example, your backup server can be
32 hidden behind a one-way firewall on a private or dynamic IP
33 address; using an ssh key, it can be authorized to ssh into
34 each of your important machines.  After connecting to each
35 destination machine, it initiates a backup, receiving the
36 resulting data and storing in its local repository.
37
38 For example, if you run several virtual private Linux
39 machines on a remote hosting provider, you could back them
40 up to a local (much less expensive) computer in your
41 basement.
42
43
44 # EXAMPLES
45
46     # First index the files on the remote server
47     
48     $ bup on myserver index -vux /etc
49     bup server: reading from stdin.
50     Indexing: 2465, done.
51     bup: merging indexes (186668/186668), done.
52     bup server: done
53     
54     # Now save the files from the remote server to the
55     # local $BUP_DIR
56     
57     $ bup on myserver save -n myserver-backup /etc
58     bup server: reading from stdin.
59     bup server: command: 'list-indexes'
60     PackIdxList: using 7 indexes.
61     Saving: 100.00% (241/241k, 648/648 files), done.    
62     bup server: received 55 objects.
63     Indexing objects: 100% (55/55), done.
64     bup server: command: 'quit'
65     bup server: done
66     
67     # Now we can look at the resulting repo on the local
68     # machine
69     
70     $ bup ftp 'cat /myserver-backup/latest/etc/passwd'
71     root:x:0:0:root:/root:/bin/bash
72     daemon:x:1:1:daemon:/usr/sbin:/bin/sh
73     bin:x:2:2:bin:/bin:/bin/sh
74     sys:x:3:3:sys:/dev:/bin/sh
75     sync:x:4:65534:sync:/bin:/bin/sync
76     ...
77     
78 # SEE ALSO
79
80 `bup-index`(1), `bup-save`(1), `bup-split`(1)
81
82 # BUP
83
84 Part of the `bup`(1) suite.