initial implementation for joplin
This commit is contained in:
16
create_restic_repo.sh
Executable file
16
create_restic_repo.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "$(tput setaf 1)No repo name specified$(tput sgr0)"
|
||||
echo "Usage: $0 <repo name>"
|
||||
exit 1
|
||||
else
|
||||
# Assign the directory to a variable
|
||||
REPO_PATH=/mnt/backups/$1
|
||||
echo -e "Creating $(tput setaf 4)$REPO_PATH$(tput sgr0)"
|
||||
fi
|
||||
|
||||
docker run -it --rm \
|
||||
-v /mnt/backups:/mnt/backups \
|
||||
restic/restic \
|
||||
init --repo $REPO_PATH
|
||||
Reference in New Issue
Block a user