Skip to content

Instantly share code, notes, and snippets.

View etoosamoe's full-sized avatar
🦖

Yuriy Semyenkov etoosamoe

🦖
View GitHub Profile
@etoosamoe
etoosamoe / docker-volume-transfer.md
Created April 6, 2023 08:39
How to transfer Docker Volumes to another host

Goal

You have docker volume on one host and want to move that volume to another host. For example, you want to transfer PostgreSQL container with it's volume to another host.

Solution

Actually, there is no in-a-box solution from Docker, so we need to:

  • attach our volume to another container
  • copy and archive all files
  • copy archive to another host
@etoosamoe
etoosamoe / nexus_upload_raw_repo.sh
Created November 22, 2023 12:31 — forked from claudiosteuernagel/nexus_upload_raw_repo.sh
Nexus Raw Artifact upload using cURL
#Nexus Raw Artifact upload using cURL
curl --fail -u user:password --upload-file file.zip 'https:/nexus-repository.claudiosteuernagel.com/repository/my-raw-repo/my-directory/file.zip'
@etoosamoe
etoosamoe / config
Created January 20, 2024 22:02
SSH Client configuration example | ssh config example
Host *.com
StrictHostKeyChecking no
User etoosamoe
ForwardAgent yes
IdentityFile /Users/username/.ssh/id_rsa
IdentitiesOnly yes
UserKnownHostsFile=/dev/null
UseKeychain yes
AddKeysToAgent yes
ServerAliveInterval 60
@etoosamoe
etoosamoe / ssh_chown.sh
Created January 27, 2024 21:55
ssh directory permissions // ssh files chown
chown -R $USER:$USER ~/.ssh
chmod 700 ~/.ssh
chmod 644 ~/.ssh/*
chmod 600 ~/.ssh/id_* ~/.ssh/authorized_keys
@etoosamoe
etoosamoe / sshd_config
Created February 2, 2024 10:47
SSH daemon configuration example
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.