본문 바로가기

기술스택을 쌓아보자80

du - 폴더 하위의 파일 사이즈의 총합을 알아보기 du -csh /path/to/folder c: 총합을 출력 s: 개별 파일 및 하위 폴더 크기 대신 합계만 표시 h: KB, MB, GB 등으로 크기를 표시 2023. 9. 15.
[RDS] aws cli로 스냅샷으로 똑같은 DB를 다른 VPC에 만들기 (production db와 staging db 값 맞추기) DB 스냅샷 복원의 특징 - 사실은 스냅샷을 바탕으로 복구하는 것이 아니라, 스냅샷을 바탕으로한 DB를 새로 똑같이 만드는 것이다. (그래서 실제로 restore 명령어를 쓰다보면, 이미 있는 db는 이름을 사용할 수 없게 나옴!) 요구사항 실시간으로 prod와 stg의 값이 동일할 필요는 없음 DMS 등의 서비스를 사용할 필요가 없음. 최종 cmd # 1 기존 db 삭제 /usr/bin/aws rds delete-db-instance --db-instance-identifier {{staging db}} --skip-final-snapshot # 2 db 삭제 상태 확인 => 그냥 gateway로 15분 대기 aws rds describe-db-instances --db-instance-identifi.. 2023. 9. 1.
Error saving credentials: error storing credentials - err: exit status 1, out: `Error spawning command line “dbus-launch --autolaunch=--binary-syntax --close-stderr”: Child process exited with code 1` Error saving credentials: error storing credentials - err: exit status 1, out: `Error spawning command line “dbus-launch --autolaunch= --binary-syntax --close-stderr”: Child process exited with code 1` docker login을 하는데 위와 같은 에러가 나왔다. 패키지가 누락 된 것이니 아래 패키지를 신규로 설치해주면 된다. sudo apt install gnupg2 pass 2023. 8. 6.
[git] remote git에 로컬 경로 연결하기 보통 git clone 을 통해 깃에서 코드를 받아오는데, 간혹 내가 로컬에서 만든 파일을 비어있는 깃 레포에 올리고 싶을 때가 있다. (제 표현이 이해 가세요?? 제가 봐도 좀 애매한디) 깃과 연결되어 있지 않은 경로를 git 에 업로드 하고 싶을 때! 아래와 같이 해주면 된다 # 현재위치에서 git initialize git init # 저는 경로를 통째로 업로드하고 싶어서요 git add . # 브랜치는 main 혹은 master git checkout -b main git commit -m "commitcommit" # remote 연결 저장소 git remote add origin git push -u origin main 2023. 7. 19.