Home > Braindump > And backing up gitorious

And backing up gitorious

January 31st, 2011 Leave a comment Go to comments
On Wed, Dec 30, 2009 at 5:09 PM, Benjamin Podszun <
benjamin.pods...@gmail.com> wrote:

> What I want to know: How do you backup the whole stack?
>
> I could easily drop nightly pulls for each repository on a tape.
> I could easily backup the database the same way.
>

That should be sufficient, just keep your configuration files too.


> But - is that enough? And how would I reconstruct the environment? The
> repositories have cryptic (hashed) names.
>

The database contains the hashed paths for the repositories, mapping things
like "gitorious/mainline.git" to the hashed names.


> The database has overlaps with the filesystem (it contains the ssh
> keys, but what happens if the git user's authenticated_keys2 is empty
> because I just set the machine up again?) where I can see potential
> problems.
>

Extracting the ssh keys from the database to the authorized_keys file is
done by the ssh_key_processor script, which again calls out to the SshKey
class. Provided you have the poller script running, entering something along
the lines of:

  SshKey.all.each(&:publish_creation_message)

would put messages on the message queue that, when processed, would add the
key to the authorized_keys file.


> I wouldn't know how to import source and wiki content back into
> gitorious, without a lot of struggle and cursing. Did anyone something
> like that before? Is there a guide out there, that I missed? Any
> scripts, experiences, ideas? I'd hope that the gitorious.org service
> has something like this in place. How is it done?
>

The wikis are Git repositories too, so restoring the database and
repositories from a backup to the same file system locations as before
should "just work". Just make sure you keep a backup of your configuration
files too, in case you forget...

Regards,
Marius

--

You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To post to this group, send email to gitori...@googlegroups.com.
To unsubscribe from this group, send email to 
gitorious+unsubscr...@googlegroups.com.
For more options, visit this group at 
https://groups.google.com/group/gitorious?hl=en.
Tags:
  1. No comments yet.
  1. No trackbacks yet.