unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: Phil <phil@beadling.co.uk>
Cc: help-guix@gnu.org
Subject: Re: Moving /gnu/store safely?
Date: Wed, 03 Mar 2021 17:38:13 +0100	[thread overview]
Message-ID: <878s74yyyy.fsf@nckx> (raw)
In-Reply-To: <85mtvkmjvr.fsf@beadling.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]

Phil,

Barring unnoticed devils in details your process looks safe. 
Running ‘guix gc --verify’ is a good idea; add 
‘=repair[,contents]’ if you're paranoid.

Phil 写道:
> There were some gremlins tho - on restarting Guix the /gnu/store 
> was
> seen to grow to approximately double it's size.

[...]

>     rsync -va /gnu/store /some_other_disk/gnu/

As gremlin's go this one is pretty tame, even cuddly: the Guix 
daemon deduplicates identical files, and creates hard links 
instead, saving a good amount of space.  That's all.

By default, rsync does not preserve hard links (because of 
potential pathological performance issues, IIRC).  This won't 
break /gnu/store: indentical files are still identical, they just 
take up more space.

To preserve them, you can use:

  -H, --hard-links
    This tells rsync to look for hard-linked files in the
    source and link together the corresponding files on the
    destination.  Without this option, hard-linked files in the
    source are treated as though they were separate files.

(I add ’-HAX’ as a matter of habit when making full-system 
back-ups.)

> I noted however that the new /gnu/store was approx double in 
> size - it
> looked like it had created new links to represent store items.

No, the links were *lost* and replaced by separate files during 
rsyncing.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

  parent reply	other threads:[~2021-03-03 16:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 13:44 Moving /gnu/store safely? Phil
2021-03-03 13:49 ` Julien Lepiller
2021-03-03 14:49 ` André Batista
2021-03-03 19:10   ` Phil
2021-03-03 16:38 ` Tobias Geerinckx-Rice [this message]
2021-03-03 20:14   ` Phil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s74yyyy.fsf@nckx \
    --to=me@tobias.gr \
    --cc=help-guix@gnu.org \
    --cc=phil@beadling.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).