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