Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Kopano backup

    Kopano Groupware Core
    4
    8
    606
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dondu1960
      dondu1960 last edited by

      Dear all,
      I would like to secure my installation with regular backups and 2 of 3 different kinds of backups are running. My Kopana (univation) server is running in a virtual environment and on a monthly bases the complete server will be backuped offline. Second, from Monday to Saturday a sqldump is running and the output is stored on another network device. I’m now looking for a best practice of running a database offline backup of my database on Sunday. The process should run fully automated by the cron daemon. Which processes needs to be stopped in which way and are there additional directories which needs to be backuped in addition by storing some attachements from the kopano system?
      Thanks in advance
      Uwe

      1 Reply Last reply Reply Quote 0
      • mcostan
        mcostan last edited by

        Personally I do something rather drastic. On a Sunday I stop kopano-server, then take a physical copy of the database MySQL files /var/lib/MySQL every sunday.

        This Is in addition to the sql dump that I take daily.

        And just to be more paranoid, since the MySQL database is running on a separate virtual machine, on Sunday I copy the entire virtual machine too and I keep a copy of that too.

        1 Reply Last reply Reply Quote 0
        • dondu1960
          dondu1960 last edited by

          Looks good and I try to do a similar approach but a kopano-server stop is not working. May be it is related to the univention installation.

          root@kopano:~# ps -ef |grep kopano
          kopano 422 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-ical -F
          kopano 451 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-gateway -F
          kopano 452 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-dagent -l
          kopano 453 1 0 11:05 ? 00:00:01 /usr/bin/python2 /usr/sbin/kopano-search -F
          kopano 455 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-spooler -F
          kopano 458 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-monitor -F
          kopano 514 455 0 11:05 ? 00:00:00 /usr/sbin/kopano-spooler -F
          kopano 515 452 0 11:05 ? 00:00:00 /usr/sbin/kopano-dagent -l
          kopano 1454 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-server -F
          kopano 1612 453 0 11:05 ? 00:00:00 /usr/bin/python2 /usr/sbin/kopano-search -F
          kopano 1629 453 0 11:05 ? 00:00:00 /usr/bin/python2 /usr/sbin/kopano-search -F
          root 5449 5431 0 11:08 pts/0 00:00:00 grep kopano
          root@kopano:~# kopano-server stop
          Fri Nov 23 11:08:47 2018: [=======] Starting kopano-server version 8.6.2 (pid 6483)
          Fri Nov 23 11:08:47 2018: [crit ] Unable to bind to port 236: Die Adresse wird bereits verwendet. This is usually caused by another process (most likely another server) already using this port. This program will terminate now.
          Beendet
          root@kopano:~# ps -ef |grep kopano
          kopano 422 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-ical -F
          kopano 451 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-gateway -F
          kopano 452 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-dagent -l
          kopano 453 1 0 11:05 ? 00:00:01 /usr/bin/python2 /usr/sbin/kopano-search -F
          kopano 455 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-spooler -F
          kopano 458 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-monitor -F
          kopano 514 455 0 11:05 ? 00:00:00 /usr/sbin/kopano-spooler -F
          kopano 515 452 0 11:05 ? 00:00:00 /usr/sbin/kopano-dagent -l
          kopano 1454 1 0 11:05 ? 00:00:00 /usr/sbin/kopano-server -F
          kopano 1612 453 0 11:05 ? 00:00:00 /usr/bin/python2 /usr/sbin/kopano-search -F
          kopano 1629 453 0 11:05 ? 00:00:00 /usr/bin/python2 /usr/sbin/kopano-search -F
          root 6820 5431 0 11:08 pts/0 00:00:00 grep kopano

          fbartels 1 Reply Last reply Reply Quote 0
          • mcostan
            mcostan last edited by

            not sure how it works on univention but normally I type things like

            service kopano-server stop

            i.e. it’s a service not a program.

            1 Reply Last reply Reply Quote 0
            • Martin
              Martin last edited by

              Here is what i do in my regularly daily cron-job:

              #!/bin/sh
              day=$(date +"%a")
              echo “Daily Backup started”
              /usr/bin/mysqldump --single-transaction --routines -u kopanoDbUser kopano | gzip -9 > /mnt/backups/Kopano/sqldump/${day}-kopano.sql.gz
              cp -r /var/lib/kopano/attachments /mnt/backups/Kopano/
              /usr/sbin/kopano-backup --worker-processes 1 --log-level warning --output-dir /mnt/backups/Kopano/kopano-backups/
              cp -r /var/univention-backup /mnt/backups/Kopano/
              echo “Daily Backup finished”

              1 Reply Last reply Reply Quote 1
              • fbartels
                fbartels Kopano @dondu1960 last edited by fbartels

                @dondu1960 said in Kopano backup:

                root@kopano:~# kopano-server stop

                as @mcostan already said you would need to execute this either as service kopano-server stop or directly through systemd as systemctl stop kopano-server. What you did here was starting another instance of kopano-server just with the argument “stop”.

                Stopping the kopano-server process is totally unnecessary if everything you want to do is make a dump of your database. What you would need to do here is simply pass the option --single-transaction to mysql.

                (a downside of stopping kopano-server is that you lose all your cached information btw and caches have to be refilled after the process is started again)

                This is all explained in the manual btw. https://documentation.kopano.io/kopanocore_administrator_manual/upgrading.html#creating-backups

                Regards Felix

                Resources:
                https://kopano.com/blog/how-to-get-kopano/
                https://documentation.kopano.io/
                https://kb.kopano.io/

                Support overview:
                https://kopano.com/support/

                1 Reply Last reply Reply Quote 0
                • dondu1960
                  dondu1960 last edited by

                  Thanks. Working now as requested

                  1 Reply Last reply Reply Quote 0
                  • mcostan
                    mcostan last edited by

                    In my case I stop kopano-server because I am paranoid hence I take a dump of the database (which indeed happens while kopano-server is running) plus a physical copy of /var/lib/MySQL (which requires the database to be stopped too) and then a physical copy of the disk of the virtual machine.

                    Paranoia that’s what it is called.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post