You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/backups/README.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,8 +48,15 @@ uv run python3 main.py backup-file-metadata
48
48
> activate and deactivate the virtual environment manually with
49
49
> `source .venv/bin/activate` and `deactivate`, respectively.
50
50
51
+
> [!TIP]
52
+
> If the `request` command is in progress and you have to leave
53
+
> causing you to lose internet, you can pause the process on Linux/MacOS
54
+
> using `Ctrl + Z` and then resume the process in the foreground with `fg`
55
+
> to prevent losing your progress. (This has only been tested on MacOS
56
+
> and using Eduroam wifi before and after pausing. Switching networks might not work.)
57
+
51
58
> [!WARNING]
52
-
> OkPy tokens expire within a few hours. If you are in the middle of
59
+
> OkPy tokens expire within < 12 hours. If you are in the middle of
53
60
> running the `request` command and your token expires, making an API
54
61
> request will cause a 401 Forbidden error and then the script will terminate,
55
62
> losing all your progress. Therefore, we recommend always getting a fresh
@@ -101,20 +108,20 @@ cd data/private/cal/cs88/fa25/ants
101
108
```
102
109
1. Run the following command to synchronize the contents of the folder you are currently inside to the folder in our AWS S3 bucket, replacing `$BUCKET_NAME` with your desired bucket and `$FILE_PATH` with your desired path:
103
110
```sh
111
+
# Regular sync: Upload all files in current directory to destination path in the bucket
104
112
aws s3 sync . s3://$BUCKET_NAME/$FILE_PATH
105
113
106
-
# Example
114
+
# Sync + delete: Same as above + delete any files in destination that aren't in current directory
> We recommend keeping the `$FILE_PATH` the same for steps 1-2 above for consistency, although technically they can differ.
112
124
113
-
> [!TIP]
114
-
> You can pass the `--delete` flag with `aws s3 sync` so that files that
115
-
> are in the destination but not in the source are deleted.
116
-
> See the [AWS CLI docs](https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html) for more.
117
-
118
125
## Dumping database from OkPy Backups CLI into Rails database
119
126
120
127
1.**Optional if not done already:** Run backups CLI command(s) in this directory to create or update `$OUTPUT_DB_NAME.db`. If you are an internal contributor working with the dev dataset from `data.zip`, skip this step.
0 commit comments