Skip to content

Instantly share code, notes, and snippets.

View matipl-pl's full-sized avatar

matipl matipl-pl

View GitHub Profile
@matipl-pl
matipl-pl / zimbra-backup-emails.sh
Created October 27, 2022 15:59 — forked from filippo/zimbra-backup-emails.sh
How to backup and restore emails of a specific account on zimbra
# The command below creates a tgz file with all emails for user@domain.com in .eml format:
# execute as root
/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL "//?fmt=tgz" > /tmp/account.tgz
# You can do the same via a REST URL:
wget http://ZIMBRA.SERVER/home/user@domain.com/?fmt=tgz
# to restore email:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL "//?fmt=tgz&resolve=reset" /tmp/account.tgz
@matipl-pl
matipl-pl / sp_BackupDatabases.sql
Created December 17, 2020 17:56 — forked from WimObiwan/sp_BackupDatabases.sql
sp_BackupDatabases on SQL Express
USE [master]
GO
/****** Object: StoredProcedure [dbo].[sp_BackupDatabases] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('sp_BackupDatabases') IS NOT NULL
BEGIN
@matipl-pl
matipl-pl / pg_schema_size.sql
Created September 26, 2018 09:27 — forked from AndreyStekov/pg_schema_size.sql
Get schema size (postgres).
SELECT pg_size_pretty(sum(pg_relation_size(quote_ident(schemaname) || '.' || quote_ident(tablename)))::bigint) FROM pg_tables
WHERE schemaname = 'yourschema'
@matipl-pl
matipl-pl / README.md
Created May 7, 2018 14:04 — forked from magnetikonline/README.md
Example Nginx & PHP-FPM systemd service configs.

Example Nginx & PHP-FPM systemd service configs

A set of really basic systemd configs for starting Nginx and PHP-FPM on system boot.

  • Ensures Nginx web server has started before starting the PHP-FPM process.
  • PHP-FPM pid file placed at /run/php7/php-fpm.pid, PHP7 PHP-FPM config at /etc/php7.
  • Based on usage with Ubuntu 16.04LTS.

Both scripts placed in /lib/systemd/system and enabled by the following:

Keybase proof

I hereby claim:

  • I am matipl-pl on github.
  • I am matipl (https://keybase.io/matipl) on keybase.
  • I have a public key whose fingerprint is 30E5 A434 4D67 4B61 EC37 82E4 BBCC C7CE 3944 20D9

To claim this, I am signing this object: