-
Notifications
You must be signed in to change notification settings - Fork 2
Backup
Adrian Wilke edited this page Nov 27, 2019
·
7 revisions
Commands to copy the home directory of the nbgrader admin and the nbgrader database.
Generate a SSH key
(-N ''
sets empty password)
ssh-keygen -t rsa -b 4096 -N '' -f ~/.ssh/id_EXAMPLE_CS_UPB_DE
Copy public key to server
ssh-copy-id -i ~/.ssh/id_EXAMPLE_CS_UPB_DE [email protected]
Add identity to client/agent
ssh-add -l # List identities
ssh-add ~/.ssh/id_EXAMPLE_CS_UPB_DE # Add identity
ssh-add -l # Check if identity was added
ssh [email protected] # Test
Troubleshooting: Fix permissions warning
chmod go-rwx ~/.ssh/id_EXAMPLE_CS_UPB_DE
(-r
recursively copies directories)
rsync -r -e ssh [email protected]:FILEORDIR LOCALDIR
# Create an image using the container of interest
sudo docker commit nbgsnlp tmp
# Duplicate the mount directory
cp -R /mnt/nbgsnlp/ /tmp/tmpnbgsnlp
# Start a new container using the image and the mount directory duplicate
sudo docker run -t -d -p 8000:8000 -v /tmp/tmpnbgsnlp:/home/nbgadmin --name tmp tmp:latest
Info: https://tuhrig.de/difference-between-save-and-export-in-docker/
# persist container
sudo docker export snlp1920 > snlp1920dockerexport.tar
# copy file
# test on local system
$ sudo docker import snlp1920dockerexport.tar
sha256:7df4821412e00440f570106e75e0d144a574f612f8e4b1854a9ad737e49f11f4
$ sudo docker run -i -t 7df4821412e0 /bin/bash