Skip to content

Multisite #15

@retlehs

Description

@retlehs

Note from @ouun:

@vdrnn and @vdrnn extended a bit your amazing Sync-Script by Multisite support and auto-purging of the last n backups. Thought you might be interested in the additions:

search-replace "${FROMSITE#*//}" "${TOSITE#*//}" --all-tables-with-prefix --include-columns=domain is for wp_site & wp_blocks tables. A replacement of the domain, not the URL, is required there.

The auto-purging is a bit experimental, but works fine for us so far. We want the backups to be kept in a subfolder /backups (wp db export --file=./backups/$(date +'%Y-%m-%d_%H-%M-%S').sql --default-character-set=utf8mb4) and we only want to keep the last 5 files (find ./backups -name '*.sql' | sort -nr | tail -n +6 | xargs rm -f). I think you get the idea.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions