librelist archives

« back to archive

Warning: Attempting to access a previously unknown unencrypted repository

Warning: Attempting to access a previously unknown unencrypted repository

From:
Sean Seago
Date:
2015-04-23 @ 17:29
What, exactly, does this warning mean?

In my context it's followed by "attic: Error: Cache initialization aborted"

Here's what I'm trying to do...

Attic 0.15 is being used to backup my laptop to a QuikStor RDX hard disk
cartridge (btrfs inside LUKS), rotated 1 per day of the week.  The drive
I'm backing up is a 1TB SSD for /home formatted with XFS for the whole
drive.  Digging around somewhere I found that attic is using
~/.cache/attic as it's working cache and I don't want all those writes
going to my drive so I'm creating a RAM drive of 1GiB for it to work
in.  I have gobs of RAM so this is trival, but my hard drives are
precious.  Also, doing so speeds up my initial backup from 5 hours on a
new media down to just over 3 hours for about 600GB of data.  All of
this is scripted, but I'm sure I'm doing something wrong because of the
warning and error I'm getting which prevents me from making further backups.

My destination media contains three subvolumes: 1 for backup tools
(attic binaries in the event of system failure), one for snapshots, and
one in the format of $(hostname)-$(id -u -n)-$(id -u)-$(id -g).attic
which serves as my repository.

The script that runs the backup is set to run every two hours and does
the following:
* Create a RAM drive on /dev/ram1, format it to ext2
* Create ~/.cache/attic_tmp, mount the RAM drive to it, change ownership
to the backing up user and that user's primary group
* rsync -ar ~/.cache/attic ~/.cache/attic_tmp
* Unmount /dev/ram1
* Mount /dev/ram1 to ~/.cache/attic
* attic create -v --stats --exclude-from ~/.attic/excludes
<path_to_repository>::$(date -u +%Y%m%dT%H%MZ) $HOME
* unmount /dev/ram1, mount it to ~/.cache/attic_tmp
* rsync -ar ~/.cache/attic_tmp ~/.cache/attic
* unmount /dev/ram1
* rm ~/.cache/attic_tmp

Should I be using one of the --delete switches with rsync?  I noticed
that if the ~/.cache/attic folder is removed entirely, the same error is
reported. 
Can you create a RAM drive in attic via a switch specifying the size of
the desired RAM drive?  I know it's trivial in python (on Linux), but I
don't have the Python-fu of the developer's on this project so I have no
idea where that should go.

There's a lot here so I guess I'll just leave this as is to let someone
chew on it and spit out some guidance.  Primarily, how do I prevent the
conditions creating the error and warning I'm seeing?


Kind Regards,

Sean S.

Re: Warning: Attempting to access a previously unknown unencrypted repository

From:
Sean Seago
Date:
2015-04-29 @ 19:59
The error message specifically mentions the archive not being encrypted, 
so I thought I'd test this out by allowing a repository to be set up 
with encryption.  It looks like it wants to work, but then there's an 
unhandled exception, using the setup mentioned previously (cache in "RAM 
disk").  I get an error, but before I create a bug report (or even 
double check to make sure this hasn't already been reported), is the 
failure by design when an archive isn't encrypted?  I apologize if this 
has already been discussed.

On 04/23/2015 12:29 PM, Sean Seago wrote:
> What, exactly, does this warning mean?
>
> In my context it's followed by "attic: Error: Cache initialization aborted"
>
> Here's what I'm trying to do...
>
> Attic 0.15 is being used to backup my laptop to a QuikStor RDX hard disk
> cartridge (btrfs inside LUKS), rotated 1 per day of the week.  The drive
> I'm backing up is a 1TB SSD for /home formatted with XFS for the whole
> drive.  Digging around somewhere I found that attic is using
> ~/.cache/attic as it's working cache and I don't want all those writes
> going to my drive so I'm creating a RAM drive of 1GiB for it to work
> in.  I have gobs of RAM so this is trival, but my hard drives are
> precious.  Also, doing so speeds up my initial backup from 5 hours on a
> new media down to just over 3 hours for about 600GB of data.  All of
> this is scripted, but I'm sure I'm doing something wrong because of the
> warning and error I'm getting which prevents me from making further backups.
>
> My destination media contains three subvolumes: 1 for backup tools
> (attic binaries in the event of system failure), one for snapshots, and
> one in the format of $(hostname)-$(id -u -n)-$(id -u)-$(id -g).attic
> which serves as my repository.
>
> The script that runs the backup is set to run every two hours and does
> the following:
> * Create a RAM drive on /dev/ram1, format it to ext2
> * Create ~/.cache/attic_tmp, mount the RAM drive to it, change ownership
> to the backing up user and that user's primary group
> * rsync -ar ~/.cache/attic ~/.cache/attic_tmp
> * Unmount /dev/ram1
> * Mount /dev/ram1 to ~/.cache/attic
> * attic create -v --stats --exclude-from ~/.attic/excludes
> <path_to_repository>::$(date -u +%Y%m%dT%H%MZ) $HOME
> * unmount /dev/ram1, mount it to ~/.cache/attic_tmp
> * rsync -ar ~/.cache/attic_tmp ~/.cache/attic
> * unmount /dev/ram1
> * rm ~/.cache/attic_tmp
>
> Should I be using one of the --delete switches with rsync?  I noticed
> that if the ~/.cache/attic folder is removed entirely, the same error is
> reported.
> Can you create a RAM drive in attic via a switch specifying the size of
> the desired RAM drive?  I know it's trivial in python (on Linux), but I
> don't have the Python-fu of the developer's on this project so I have no
> idea where that should go.
>
> There's a lot here so I guess I'll just leave this as is to let someone
> chew on it and spit out some guidance.  Primarily, how do I prevent the
> conditions creating the error and warning I'm seeing?
>
>
> Kind Regards,
>
> Sean S.

Warning: Attempting to access a previously unknown unencrypted repository

From:
Jean Jordaan
Date:
2015-05-06 @ 11:13
Hi there

Attempting to resume a backup for which I've saved many versions
already, attic now stops with this message:

Warning: Attempting to access a previously unknown unencrypted repository
attic: Error: Cache initialization aborted

What does that mean, and what can I do to unwedge attic?

-- 
jean                                              . .. .... //\\\oo///\\

Re: Warning: Attempting to access a previously unknown unencrypted repository

From:
Jean Jordaan
Date:
2015-05-06 @ 11:39
On Wed, May 6, 2015 at 7:13 PM, Jean Jordaan <jean.jordaan@gmail.com> wrote:
>
> Warning: Attempting to access a previously unknown unencrypted repository
> attic: Error: Cache initialization aborted
>
> What does that mean, and what can I do to unwedge attic?

This looks like what we're encountering:
  https://github.com/jborg/attic/issues/299

We do not get the prompt though.

Attic version 0.15

-- 
jean                                              . .. .... //\\\oo///\\

Re: [attic] Re: Warning: Attempting to access a previously unknown unencrypted repository

From:
Jonas Borgström
Date:
2015-05-08 @ 15:49
On 06/05/15 13:39, Jean Jordaan wrote:
> On Wed, May 6, 2015 at 7:13 PM, Jean Jordaan <jean.jordaan@gmail.com> wrote:
>> Warning: Attempting to access a previously unknown unencrypted repository
>> attic: Error: Cache initialization aborted
>>
>> What does that mean, and what can I do to unwedge attic?
> This looks like what we're encountering:
>    https://github.com/jborg/attic/issues/299
>
> We do not get the prompt though.
Yeah, sorry about that. It looks like there was a typo in a last minute 
change I did that prevented the interactive prompt from working properly.
I've fixed that now in git. I'll probably make a new release in the near 
future as well.

/ Jonas

Re: [attic] Re: Warning: Attempting to access a previously unknown unencrypted repository

From:
Jean Jordaan
Date:
2015-05-11 @ 03:36
On Fri, May 8, 2015 at 11:49 PM, Jonas Borgström <jonas@borgstrom.se> wrote:
> On 06/05/15 13:39, Jean Jordaan wrote:
>> We do not get the prompt though.
> Yeah, sorry about that. It looks like there was a typo in a last minute

Ah, OK :-)

We're using the environment variable override, which works, but it
feels wrong, as that backup will be accessed by various entities over
its lifetime. At the moment project ownership is being transferred to
a different department, and they will have their own policies again.
So a way to restore 'trust' in a repo would be good.

Regards,
-- 
jean                                              . .. .... //\\\oo///\\

Re: [attic] Re: Warning: Attempting to access a previously unknown unencrypted repository

From:
Jonas Borgström
Date:
2015-05-13 @ 11:51
On 11/05/15 05:36, Jean Jordaan wrote:
> On Fri, May 8, 2015 at 11:49 PM, Jonas Borgström <jonas@borgstrom.se> wrote:
>> On 06/05/15 13:39, Jean Jordaan wrote:
>>> We do not get the prompt though.
>> Yeah, sorry about that. It looks like there was a typo in a last minute
> Ah, OK :-)
>
> We're using the environment variable override, which works, but it
> feels wrong, as that backup will be accessed by various entities over
> its lifetime. At the moment project ownership is being transferred to
> a different department, and they will have their own policies again.
> So a way to restore 'trust' in a repo would be good.
I'm not sure I follow what you mean by restoring 'trust'. You should 
only need to confirm the exception once.

Do you get this warning/question on each access to a specific repository?

Btw, the typo is easy to fix yourself by editing line 71 in cache.py, 
see the following link for details:


https://github.com/jborg/attic/commit/a24d0f4cba4f9d0e5a9bc9f87b490f73502e48d5#diff-5cfa38356a90d5065f946a79d63c9b7a

/ Jonas

Re: [attic] Re: Warning: Attempting to access a previously unknown unencrypted repository

From:
Jean Jordaan
Date:
2015-05-13 @ 14:43
>> So a way to restore 'trust' in a repo would be good.
> I'm not sure I follow what you mean by restoring 'trust'. You should
> only need to confirm the exception once.

I never get to see the prompt, so I don't get to confirm the exception.

> Do you get this warning/question on each access to a specific repository?

Yes, attic would not start, reporting
"Warning: Attempting to access a previously unknown unencrypted repository"

> Btw, the typo is easy to fix yourself by editing line 71 in cache.py,

Cool, thanks, I'll try that.

-- 
jean                                              . .. .... //\\\oo///\\