The plan is to move a repo from a Google Cloud Storage bucket to a local directory.
Here is what I did:
-
Set environment for the remote repo (password hidden):
$ export GOOGLE_PROJECT_ID=wiwi-backup $ export GOOGLE_APPLICATION_CREDENTIALS=$HOME/.config/gs-secret-restic-key.json $ export RESTIC_PASSWORD=… $ export RESTIC_REPOSITORY=gs:t550:/
-
Initialized the local repo using the chunker parameters from the remote repo:
$ restic -r ~/.restic_repo init --from-repo gs:t550:/ --copy-chunker-params
-
Copied all snapshots from the remote repo:
$ restic -r ~/.restic_repo copy --from-repo gs:t550:
-
Checked the local repo with
restic check
andrestic stats
, and all looked good. -
From a Systemd service, ran the backup using the same parameters as before, but with the local repo instead of the remote repo (password hidden):
[Unit] Description=Run Restic Backup [Service] Environment=RESTIC_REPOSITORY=/home/wiwi/.restic_repo Environment=RESTIC_PASSWORD=… ExecStart=restic backup --verbose --exclude-caches backup %h [Install] WantedBy=default.target
In the last step, I realized that it generated a lot of data. In fact the local disk overflowed. This is unexpected as only very little had changed of the data in the directory being backed up. Apparently, despite initiating the local repo with the chunker parameters from the remote repo, deduplication didn’t happen.
The Restic version hasn’t been changed between the last backup to the remote repo and the backup to the local repo:
$ restic version
restic 0.18.0 compiled with go1.24.1 on linux/amd64
Is there anything I did wrong?