Skip to content

Merge repositories with different chunker #1460

Answered by enboig
enboig asked this question in Q&A
Discussion options

You must be logged in to vote

It works now, created a quick bash script with AI:

#!/bin/bash

# Directori base
BASE_DIR="/mnt/restic/hosts"

if [[ ! -d "$BASE_DIR" ]]; then
    echo "El directori $BASE_DIR no existeix"
    exit 1
fi

for hostname in "$BASE_DIR"/*; do
    if [[ -d "$hostname" && ! -L "$hostname" ]]; then
        hname=$(basename "$hostname")

        for times in "$hostname"/*; do
            if [[ -d "$times" && ! -L "$times" ]]; then
                tname=$(basename "$times")

                rustic backup -P full --host "${hname}" --time "${tname}" --as-path="/" "$BASE_DIR/${hname}/${tname}"
            fi
        done
    fi
done

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@aawsome
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by aawsome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants