I have a local backup, but I still want to make one more backup to the cloud storage , how to do?
I have a cloud storage mounted at the host machine, when I tried to copy the local backup files to the mounted cloud storage, but there was no permisson of the backup files.
so I don’t know how to make two independent backups.
From what I understand from your description, this doesn’t seem to be a restic problem but rather one of your local permissions or maybe your permissions on the mounted cloud storage. A restic repository consists of normal files and folders and can indeed easily be copied to an additional location. You can then even use rsync to copy just the changes if the source repository has changed (e.g. rsync -Prvth --delete /source /target).
Thank you, I exec rsync -a ,successfully copied the backups from local to cloud, then I deleted the local backups, copied the backups from cloud to local. tested if the backups can be restored again.
docker exec restic restic restore --target /restore 000000
the result is
ignoring error for /mnt: mkdir /restore/mnt: no such file or directory
…
ignoring error for /mnt: chmod /restore/mnt: no such file or directory
Summary: Restored 0 / 8 files/dirs (0 B / 0 B) in 0:00
Sorry I don’t have any experience with using restic within docker but this doesn’t look like a problem with restic but with the setup around it. At least for my limited knowledge there is too little information in your post in order for me to understand what’s going on.
You can see whether a restic repo’s structure is intact by executing restic -r /repo check.
The answer to your question “how to run two independent backups?” is simply to run the restic backup command twice - the first time with your first repository, the second time with your second repository. You will then have two separate backups. There’s no need to copy stuff around.
If you are/want to use Docker to run your restic backup(s), then you can do one of two things:
Run two different restic containers, each having their own configuration and backing up to their own repository (after all, one Docker container is intended to run one process, so there’s nothing wrong or odd with this setup).
Run one single restic container, in which you have a script or similar that takes configuration telling it which source directories to back up to which repository. In this case it might be useful to use something like resticprofile to do the backups based on a proper configuration file that you give it/the container.
Same as above, if you want to run it using Docker containers - run several containers with each their own configuration, or one container with a configuration that defines which sources you want backed up when/how/to where.
The restore problem has solved by changing the restore location, it was a folder permission problem resulted [the ignoring error no such file or directory]