Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 43 lines (34 sloc) 1.37 KB
#!/usr/bin/bash
# (c) 2023 schrader/kreitler -- do not use wwwutz scripts :)
: ${USER:=$USER}
SPACER=$(echo $USER | tr -c ' ' ' ')
# single/old pw
echo -n "# Enter password for '$USER@https://oc-molgen.gnz.mpg.de' (OLD cloud): "
read -s PWOC
echo
echo "# Enter password for '$USER@https://nc.molgen.mpg.de' (NEW cloud),"
echo -n "# or $SPACER [RETURN] when it is the same:"
read -s PWNC
echo
if [ -z "$PWNC" ]; then
PWNC=$PWOC
fi
#echo -n "'$PWOC' '$PWNC'"
rclone config create oldOwncloud webdav \
url https://oc-molgen.gnz.mpg.de/owncloud/remote.php/webdav/ \
vendor owncloud user $USER \
pass $(rclone obscure $PWOC)
rclone config create Nextcloud webdav \
url https://nc.molgen.mpg.de/cloud/remote.php/dav/files/${USER}/ \
vendor nextcloud user $USER \
pass $(rclone obscure $PWNC)
rclone config create oldNextcloud webdav \
url https://molgen-cloud.gnz.mpg.de/remote.php/dav/files/${USER}/ \
vendor nextcloud user $USER \
pass $(rclone obscure $PWOC)
echo "oldOwncloud: https://oc-molgen.gnz.mpg.de/owncloud/remote.php/webdav/"
echo "oldNextcloud: https://molgen-cloud.gnz.mpg.de/remote.php/dav/files/${USER}/"
echo "Nextcloud: https://nc.molgen.mpg.de/cloud/remote.php/dav/files/${USER}/"
echo ""
echo "list content: 'rclone ls oldOwncloud:'"
echo "copy between clouds: 'rclone copy --dry-run oldOwncloud: Nextcloud:'"