-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump instance size, add certificate renewal stuff
- Loading branch information
Showing
5 changed files
with
82 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Restoring backups | ||
|
||
First, get the backup from s3, or r2, or wherever you put it. | ||
|
||
|
||
SCP the files onto the box. | ||
```bash | ||
scp 20241214_131900_20241214_131900* <url>:~/backups/ | ||
``` | ||
|
||
SSH onto to box. | ||
```bash | ||
ssh <url>.xyz | ||
``` | ||
|
||
Get a shell on a container with "bench" running | ||
```bash | ||
cd ~/backups | ||
docker compose run -it -v $(pwd):/backup frontend sh | ||
|
||
whoami | ||
#this should return frappe, just doulbe check ur actually in the container... | ||
``` | ||
|
||
Run the restore command | ||
```bash | ||
bench restore /backup/20241214_131900_20241214_131900-frontend-database.sql.gz --with-public-files /backup/20241214_131900_20241214_131900-frontend-files.tar --with-private-files | ||
/backup/20241214_131900_20241214_131900-frontend-private-files.tar | ||
``` | ||
|
||
> [!NOTE] | ||
> This last command may look like it hangs, give it some time. | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Runs the renew script | ||
Requires=docker-compose.app.service | ||
After=docker-compose.app.service | ||
|
||
[Service] | ||
WorkingDirectory=/home/asbotehg | ||
ExecStart=/usr/bin/docker-compose run certbot renew | ||
Restart=on-failure # Restart only on errors, not clean exits | ||
TimeoutStartSec=0 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description="Run renew.service every 24hours" | ||
|
||
[Timer] | ||
OnUnitActiveSec=24h | ||
OnCalendar=Mon..Sun *-*-* 10:00:* | ||
Unit=renew.service | ||
|
||
[Install] | ||
WantedBy=multi-user.target |