Skip to content
Snippets Groups Projects
Select Git revision
  • 7ca3770b95f32cbf2e2b25ce65561138f646aecc
  • 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

10_Backup.md

Blame
  • Hahn Axel (hahn)'s avatar
    Hahn Axel (hahn) authored
    dbce7ee7
    History
    10_Backup.md 1.68 KiB

    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

    # ./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