Skip to content
Snippets Groups Projects
Select Git revision
  • bd6aaf21c13f307a830ec0c8e16734ffa20954b8
  • master default protected
  • 7771-harden-postgres-backup
  • pgsql-dump-with-snapshots
  • update-colors
  • update-docs-css
  • usb-repair-stick
  • desktop-notification
  • 7000-corrections
  • db-detector
10 results

pgsql.sh

Blame
  • 10_Backup.md NaN GiB
    ## Typical Usage
    
    This is the main script to start a backup. The script *backup.sh* is the one to add as a cronjob. It will start
    
    * the dumps of local databases
    * the file transfer to an external repository
    
    Both of these steps can be started seperately (see next pages).
    
    ## Typical Usage
    
    * on Linux: as a non root user use sudo `sudo ./backup.sh`
    * on MS Windows: start it as user `./backup.sh`. Or double click it in a file manager (e.g. Explorer). The first time it asks what program should be used to open *.sh files - select the bash.exe ornavigate to it.
    
    ## Help
    
    ```txt
    # ./backup.sh -?
    
      ___ ___ ___ ___         _______            __
     |   |   Y   |   |       |   _   .---.-.----|  |--.--.--.-----.
     |.  |.      |.  |       |.  1   |  _  |  __|    <|  |  |  _  |
     |.  |. \_/  |.  |___    |.  _   |___._|____|__|__|_____|   __|
     |:  |:  |   |:  1   |   |:  1    \                     |__|
     |::.|::.|:. |::.. . |   |::.. .  /
     `---`--- ---`-------'   `-------'
    
    _______________________________________________________________________________  ___  __   _
    
    Param: show help
    
    START A BACKUP
    
    This script starts 
      - the database backups and creates dumps locally
      - the file backup (using restic or duplicity)
    
    SYNTAX:
    
        backup.sh [OPTIONS]
    
        default: no parameter:
    
    OPTIONS:
    
        -d, --dryrun  just show infos, do not start a backup
        -h, --help    Show this help
    
        The following parameters force the backup type (if using duplicity):
        -a, --auto    force auto 
        -o, --older   duplicity type=auto: repeat full backup if last full 
                      backup is older than ... like "1M" for 1 month
        -f, --full    force full backup (if supported)
        -i, --inc     force incrmenental backup
    
    ```