Re: Backup of databases on OpenShift

2017-06-09 Thread Jens Geiregat
Hi,

Thanks for your ideas, Aleksandar, Mateus and Louis. Replication to an
off-cloud DB seems a bit of a hassle, since we would like the backup to be
'automatically' enabled for every added database on OpenShift. The code at
https://github.com/getupcloud/backup will probably be what we end up using,
though probably modified to match our infrastructure, since we don't have
S3 our azure blob available.

Thanks again,


Jens

On Fri, Jun 9, 2017 at 9:35 AM, Louis Santillan  wrote:

> My personal feeling is that I would, for at least MySQL/MariaDB &
> PostgreSQL, setup replication with compression to a non-cluster hosted DB.
> Preferably, your ODW/DW DB instance(s) or maybe a staging DB.  With
> compression, you ship relatively small logs over the wire.
>
> ---
>
> LOUIS P. SANTILLAN
>
> SENIOR CONSULTANT, OPENSHIFT, MIDDLEWARE & DEVOPS
>
> Red Hat Consulting, NA US WEST 
>
> lpsan...@gmail.comM: 3236334854
> 
> TRIED. TESTED. TRUSTED. 
>
> On Thu, Jun 8, 2017 at 7:46 AM, Jens Geiregat 
> wrote:
>
>> Hi,
>>
>> We recently set up an OpenShift Enterprise cloud and we're wondering what
>> the best practices are for backing up databases running in an OpenShift
>> cloud. I will focus on PostgreSQL here, but the same goes for MongoDB,
>> MariaDB...
>>
>> - Should we rely on backups of the persistent volumes (we're using NFS)?
>> This would mean assuming the on-disk state is always recoverable. Which it
>> *should* be, but it does feel like a hack...
>> - Should we have an admin-level oc script that filters out all running
>> database containers and does some 'oc exec pg_dump ... > backup.sql' magic
>> on them?
>> - Should we provide some simple templates to our users that contain
>> nothing but a cron script that calls pg_dump?
>> ...
>>
>> Please share your solutions?
>>
>> Kind Regards,
>>
>>
>> Jens
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Backup of databases on OpenShift

2017-06-08 Thread Mateus Caruccio
Hi Jens,

We are using a crontab-based pod to trigger backups using rsh + upload to
object storage (s3 or azure blob).
Here is the repo: https://github.com/getupcloud/backup

It will be updated to use CronJob/ScheduledJob as soon as I get some time
work on it.

Best regards,


--
Mateus Caruccio / Master of Puppets
GetupCloud.com
We make the infrastructure invisible

2017-06-08 17:05 GMT-03:00 Aleksandar Lazic :

> Hi Jens.
>
> on Donnerstag, 08. Juni 2017 at 16:46 was written:
>
>
> Hi,
>
> We recently set up an OpenShift Enterprise cloud and we're wondering what
> the best practices are for backing up databases running in an OpenShift
> cloud. I will focus on PostgreSQL here, but the same goes for MongoDB,
> MariaDB...
>
> - Should we rely on backups of the persistent volumes (we're using NFS)?
> This would mean assuming the on-disk state is always recoverable. Which it
> *should* be, but it does feel like a hack...
> - Should we have an admin-level oc script that filters out all running
> database containers and does some 'oc exec pg_dump ... > backup.sql' magic
> on them?
> - Should we provide some simple templates to our users that contain
> nothing but a cron script that calls pg_dump?
> ...
>
> Please share your solutions?
> I like this one.
>
> oc rsh  mysqldump/pg_dump/... > backup_file
>
> Some user use Filesytem back, as you have mentioned
>
> I have seen somewhere out a concept with a sidecar container but I can't
> find it now
>
> What I have seen in the past is not the backup the problem, the restore is
> the difficult part.
> I have once needed to restore a db (postgresql) and it was not that easy
> and not automatically!
>
>
>
> Kind Regards,
>
>
> Jens
>
>
>
>
> *-- Best Regards Aleksandar Lazic - ME2Digital e. U. *
> https://me2digital.online/
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Backup of databases on OpenShift

2017-06-08 Thread Aleksandar Lazic
Title: Re: Backup of databases on OpenShift


Hi Jens.

on Donnerstag, 08. Juni 2017 at 16:46 was written:





Hi,

We recently set up an OpenShift Enterprise cloud and we're wondering what the best practices are for backing up databases running in an OpenShift cloud. I will focus on PostgreSQL here, but the same goes for MongoDB, MariaDB...

- Should we rely on backups of the persistent volumes (we're using NFS)? This would mean assuming the on-disk state is always recoverable. Which it *should* be, but it does feel like a hack...
- Should we have an admin-level oc script that filters out all running database containers and does some 'oc exec pg_dump ... > backup.sql' magic on them? 
- Should we provide some simple templates to our users that contain nothing but a cron script that calls pg_dump?
...

Please share your solutions?



I like this one.

oc rsh  mysqldump/pg_dump/... > backup_file

Some user use Filesytem back, as you have mentioned

I have seen somewhere out a concept with a sidecar container but I can't find it now

What I have seen in the past is not the backup the problem, the restore is the difficult part.
I have once needed to restore a db (postgresql) and it was not that easy and not automatically!






Kind Regards,


Jens




-- 
Best Regards
Aleksandar Lazic - ME2Digital e. U.
https://me2digital.online/



smime.p7s
Description: S/MIME Cryptographic Signature
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Backup of databases on OpenShift

2017-06-08 Thread Jens Geiregat
Hi,

We recently set up an OpenShift Enterprise cloud and we're wondering what
the best practices are for backing up databases running in an OpenShift
cloud. I will focus on PostgreSQL here, but the same goes for MongoDB,
MariaDB...

- Should we rely on backups of the persistent volumes (we're using NFS)?
This would mean assuming the on-disk state is always recoverable. Which it
*should* be, but it does feel like a hack...
- Should we have an admin-level oc script that filters out all running
database containers and does some 'oc exec pg_dump ... > backup.sql' magic
on them?
- Should we provide some simple templates to our users that contain nothing
but a cron script that calls pg_dump?
...

Please share your solutions?

Kind Regards,


Jens
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users