Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/burgossrodrigo/terraform_sql_server_ec2
https://github.com/burgossrodrigo/terraform_sql_server_ec2
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/burgossrodrigo/terraform_sql_server_ec2
- Owner: burgossrodrigo
- Created: 2024-12-13T10:14:56.000Z (11 days ago)
- Default Branch: main
- Last Pushed: 2024-12-13T11:01:37.000Z (11 days ago)
- Last Synced: 2024-12-13T11:24:56.116Z (11 days ago)
- Language: HCL
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=yourStrong(!)Password" -e "MSSQL_PID=Evaluation" -p 1433:1433 --name sqlpreview --hostname sqlpreview -d mcr.microsoft.com/mssql/server:2022-preview-ubuntu-22.04
# ssh -f -N -i chave_acesso_ssh.pem -L 1436:172.31.1.178:1433 [email protected]
# docker cp AdventureWorks2022.bak b62e7187588a:/var/opt/mssql/data
# docker exec -ti b62 "bash"
# ls /var/opt/mssql/data# docker cp AdventureWorks2019.bak 40a393d33bbe:/var/opt/mssql/data
# ssh -f -N -i porteiro_key.pem -L 1436:172.31.1.178:1433 [email protected]
# Restore
```sql
exec msdb.dbo.rds_restore_database
@restore_db_name='AdventureWorks',
@s3_arn_to_restore_from='arn:aws:s3:::sqlserver-backup-rodrigo/AdventureWorks2019.bak';
```# Backup
```sql
exec msdb.dbo.rds_backup_database @source_db_name='AdventureWorks',
@s3_arn_to_backup_to='arn:aws:s3:::sqlserver-backup-rodrigo/sqlserver-backup-rodrigo-custom.bak',
@number_of_files=1;
```# docker system prune -a --volumes