Skip to content
Snippets Groups Projects
Select Git revision
  • 24ce5c3ec7b58c5551e9b45249f49480ba284124
  • master default
2 results

restore

Blame
  • restore 444 B
    #!/bin/sh
    set -eux
    
    src="$1"
    
    alias nc_run='docker exec -iu www-data nextcloud-nextcloud-1'
    alias db_run='docker exec -iu nobody nextcloud-mysql-1'
    
    nc_run php occ maintenance:mode --on
    
    # shellcheck disable=SC2016
    zstdcat "$src/mysqldump.sql.zstd" | \
        db_run sh -c \
        'mariadb --force "--password=$MYSQL_ROOT_PASSWORD" --user=root"'
    
    zstdcat "$src/nextcloud_volume.tar.zstd" | \
        nc_run tar -x
    
    nc_run php occ maintenance:mode --off