Re: pgbackrest creating new directories (messing up cron jobs). - Mailing list pgsql-novice

From Stephen Frost
Subject Re: pgbackrest creating new directories (messing up cron jobs).
Date
Msg-id 20200310223753.GO3195@tamriel.snowman.net
Whole thread Raw
In response to Re: pgbackrest creating new directories (messing up cron jobs).  (mimble9@danwin1210.me)
Responses Re: pgbackrest creating new directories (messing up cron jobs).  (mimble9@danwin1210.me)
List pgsql-novice
Greetings,

* mimble9@danwin1210.me (mimble9@danwin1210.me) wrote:
> >> This is annoying as I have a cron job set up to focus on files in the
> >> 0000000100000000 directory.
> >
> > What is the cronjob doing..?  You really shouldn't be hacking around
> > with things in the repo- there's commands available like archive-get to
> > extract out WAL files from the repo.
>
> The cronjob is using 'mutt' to mail me the .gz files at a set period.
>
> It says:
>
> cd /var/lib/pgbackrest/archive/main/10/0000000100000000/
> echo "" | mutt -s "Ttile" test@example.com -a *.gz

Isn't that going to mail you the same WAL over and over again if you set
it up as a cronjob..?  Is that really what you want?

> Of course, once 0000000100000000 becomes 0000000100000001, this no longer
> works.

That doesn't seem like the worst of the problems here.

> Is there, perhaps, a better way to achieve my goal?

Well, you could use archive-get with pgbackrest to pull out the files by
requesting each segment number, but I'm not sure what the idea here is
exactly- *why* are you email'ing them?

Thanks,

Stephen

Attachment

pgsql-novice by date:

Previous
From: mimble9@danwin1210.me
Date:
Subject: Re: pgbackrest creating new directories (messing up cron jobs).
Next
From: mimble9@danwin1210.me
Date:
Subject: Re: pgbackrest creating new directories (messing up cron jobs).