Skip to main content


Backup Postgres SQL format

  Wget /static/ Mkdir /backup/database/ Update script BACKUP_DIR pg_backup.config Set password  su - postgres Psql \password root@vindazo /mnt/extradrive/backup/scripts # cp pgpass.conf ~/.pgpass root@vindazo /mnt/extradrive/backup/scripts # chmod 0600 ~/.pgpass It should automatically start backup from script ./ Create crontab for daily backup 0 0 * * * /mnt/extradrive/backup/scripts/ Check werking over 2 days.. And best monthly control all  backups and create one copy for backup copy.   Backup instellen old fashion vim pg_backup.config   BACKUP_DIR=/home/backup/database/ ./ vim /etc/environment         PGPASSFILE="/home/backup/scripts/pgpass.conf"    Install Tartarus wget   sudo dpkg -i tartarus_0.9.8-1_all.deb - Tartarus configuration  filesbackup.bash -----------------------

Firebase Realtime Database / Cloud Firestore Connection Python Django

It is always interesting to combine firebase with another server such as elasticsearch or crawler or mailing server on a separate server. Then of course a connection is needed, we use python in this example. sudo pip install firebase-admin import firebase_admin from firebase_admin import credentials cred = credentials . Certificate ( "path/to/serviceAccountKey.json" ) firebase_admin . initialize_app ( cred )   Init and Retrieve Data from def handle(self, *args, **options):          cred = credentials.Certificate("/")          firebase_admin.initialize_app(cred, {                  'databaseURL': ''          })          jobs = Job.objects.all()[:3]          ref = db.reference("/jobs")          import pdb;pdb.set_trace()          for job in

Postgres into a distributed database Citus Django Ubuntu

Citus is an open source extension of Postgres that can distribute data and queries among multiple nodes in a cluster. Because Citus is an extension (not a branch) of Postgres, when you use Citus, you are also using Postgres. You can take advantage of the latest Postgres features, tools, and ecosystem. In apt-get I could not add repositories because it is configured by default only have support for only LTS versions of operating systems. I will try manually downloading and installing the package.    This repository is all moved…  I found packages on this repository.   wget --content-disposition   sudo dpkg -i postgresql-12-citus-10.0_10.0.2.citus-1_amd64.deb Package libpq5 is not installed. postgresql-12-citus-10.0 depends on postgresql-12; however Package postgresql-12 is not