/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/en/admin-guide/backup.txt

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
::
58
58
 
59
59
  $ cd /var/backup
60
 
  $ bzr branch bzr+ssh://server.example.com/srv/bzr/trunk
61
 
  $ bzr branch bzr+ssh://server.example.com/srv/bzr/feature-gui
 
60
  $ brz branch bzr+ssh://server.example.com/srv/bzr/trunk
 
61
  $ brz branch bzr+ssh://server.example.com/srv/bzr/feature-gui
62
62
 
63
63
to create the branches on the backup server.  Then, we could regularly (for
64
64
example from ``cron``) do
66
66
::
67
67
 
68
68
  $ cd /var/backup/trunk
69
 
  $ bzr pull  # the location to pull from is remembered
 
69
  $ brz pull  # the location to pull from is remembered
70
70
  $ cd ../var/backup/feature-gui
71
 
  $ bzr pull  # again, the parent location is remembered
 
71
  $ brz pull  # again, the parent location is remembered
72
72
 
73
73
The action of pulling from the parent for all branches in some directory is
74
 
common enough that there is a plugin to do it.  The `bzrtools`_ plugin
75
 
contains a ``multi-pull`` command that does a ``pull`` in all branches under a
76
 
specified directory.
77
 
 
78
 
.. _bzrtools: http://launchpad.net/bzrtools
79
 
 
80
 
With this plugin installed, the above periodically run commands would be
81
 
 
82
 
::
83
 
 
84
 
  $ cd /var/backup
85
 
  $ bzr multi-pull
86
 
 
87
 
Note that ``multi-pull`` does a pull in *every* branch in the specified
88
 
directory (the current directory by default) and care should be taken that
89
 
this is the desired effect.  A simple script could also substitute for the
90
 
multi-pull command while also offering greater flexibility.
 
74
common enough that there is a plugin to do it.
91
75
 
92
76
Bound Branch Backups
93
77
~~~~~~~~~~~~~~~~~~~~
108
92
::
109
93
 
110
94
  $ cd /srv/bzr/projectx/trunk
111
 
  $ bzr push bzr+ssh://backup.example.com/var/backup/trunk
 
95
  $ brz push bzr+ssh://backup.example.com/var/backup/trunk
112
96
  $ cd ../feature-gui
113
 
  $ bzr push bzr+ssh://backup.example.com/var/backup/feature-gui
 
97
  $ brz push bzr+ssh://backup.example.com/var/backup/feature-gui
114
98
 
115
99
and then we need to bind the main branches to their backups
116
100
 
117
101
::
118
102
 
119
103
  $ cd ../trunk
120
 
  $ bzr bind bzr+ssh://backup.example.com/var/backup/trunk
 
104
  $ brz bind bzr+ssh://backup.example.com/var/backup/trunk
121
105
  $ cd ../feature-gui
122
 
  $ bzr bind bzr+ssh://backup.example.com/var/backup/feature-gui
 
106
  $ brz bind bzr+ssh://backup.example.com/var/backup/feature-gui
123
107
 
124
108
A branch can only be bound to a single location, so multiple backups cannot
125
109
be created using this method.  
197
181
  $ cd /srv
198
182
  $ mv bzr bzr.old
199
183
  $ cd bzr
200
 
  $ bzr branch bzr+ssh://backup.example.com/var/backup/trunk
201
 
  $ bzr branch bzr+ssh://backup.example.com/var/backup/feature-gui
 
184
  $ brz branch bzr+ssh://backup.example.com/var/backup/trunk
 
185
  $ brz branch bzr+ssh://backup.example.com/var/backup/feature-gui
202
186
 
203
187
If there are multiple backups, then change the URL above to restore from the
204
188
other backups.