Changes between Version 27 and Version 28 of SysAdmin/Pootle


Ignore:
Timestamp:
04/04/20 21:31:20 (18 months ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SysAdmin/Pootle

    v27 v28  
    9797#!/bin/sh
    9898NOW=\$(date +"%Y-%m-%d")
    99 tar cvf /root/po-\$NOW.tar /var/www/pootle/po
    100 gzip -9 /root/po-\$NOW.tar
    101 mysqldump pootle> /root/backup-\$NOW.sql
    102 gzip -9 /root/backup-\$NOW.sql
     99tar cvf /root/po-\$NOW.tar /home/pootle/translations
     100bzip2 -z9 /root/po-\$NOW.tar
     101su -c - postgres "pg_dump -c pootledb > /tmp/pootledb-\$NOW.sql"
     102bzip2 -z9 /tmp/pootledb-\$NOW.sql
     103mv /tmp/pootledb-\$NOW.sql.bz2 /root
    103104OLD=\$(date --date='7 day ago' +"%Y-%m-%d")
    104 rm -f /root/backup-\$OLD.sql.gz
    105 rm -f /root/po-\$OLD.tar.gz
     105rm -f /root/pootledb-\$OLD.sql.bz2
     106rm -f /root/po-\$OLD.tar.bz2
    106107EOF
    107108chmod +x /usr/local/bin/backup