Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the backup of dedicated server save file on S3? can you guide me? #18

Open
ridwanaliah opened this issue Feb 14, 2024 · 13 comments
Assignees
Labels
question Further information is requested

Comments

@ridwanaliah
Copy link

Hello The Sudo,

I have enabled the backup s3 modules
image

but why i still dont get the backup file on s3?
image

it says: No object found
can you help me?
thank you, sir.

@ridwanaliah ridwanaliah added the question Further information is requested label Feb 14, 2024
@Josh-Tracy
Copy link
Contributor

What version of the module are you using and what AWS region are you in.

@Josh-Tracy
Copy link
Contributor

@ridwanaliah also, set the backup_s3_bucket_arn = "" and backup_s3_bucket_name = "". Those inputs are only used when you have create_backup_s3_bucket = false because you have an existing S3 bucket you want to use.

@ridwanaliah
Copy link
Author

What version of the module are you using and what AWS region are you in.

i used the sudo 1.1.0, my region ap-southeast-1

@ridwanaliah
Copy link
Author

ridwanaliah commented Feb 14, 2024

@ridwanaliah also, set the backup_s3_bucket_arn = "" and backup_s3_bucket_name = "". Those inputs are only used when you have create_backup_s3_bucket = false because you have an existing S3 bucket you want to use.

okay i'll try it now

image

PS:
I have changed it to your advice, and now i'm waiting for the backup files

@Josh-Tracy
Copy link
Contributor

Josh-Tracy commented Feb 14, 2024

Version 1.1.1 includes a bug fix to support certain AWS regions with s3. If the palworld_backup_log.txt file in the /palworld-server directory says something like this:

An error occurred (IllegalLocationConstraintException) when calling the PutObject operation: The ap-southeast-1 location constraint is incompatible for the region specific endpoint this request was sent to.

Then you need to update the module version to 1.1.1 and do one of these 2 options:

Option 1

Delete your server and rerun terraform apply to get a new server with the new user_data script. This will build a new /palworld-server/palworld_backup_script.sh on your server with the fix applied.

Option 2

SSH into your server and edit the existing backup script located in /palworld-server/palworld_backup_script.sh and look for these lines:

aws s3 cp "\$BACKUP_FILENAME" s3://"\$S3_BUCKET_NAME"/ 
aws s3 cp "\$GUS_BACKUP" s3://"\$S3_BUCKET_NAME"/ 

and add --region af-south-1 to the end of both of them. Example:

aws s3 cp "\$BACKUP_FILENAME" s3://"\$S3_BUCKET_NAME"/ --region ap-southeast-1
aws s3 cp "\$GUS_BACKUP" s3://"\$S3_BUCKET_NAME"/ --region  ap-southeast-1

@ridwanaliah
Copy link
Author

Can you give me some instruction how to update to 1.1.1 module?

anyway i still don't get any backup files

@ridwanaliah
Copy link
Author

Option 1
Delete your server and rerun terraform apply to get a new server with the new user_data script. This will build a new /palworld-server/palworld_backup_script.sh on your server with the fix applied.

if i do this, all my dedicated server save games will lost or not?

@ridwanaliah
Copy link
Author

hello, i've updated the module to 1.1.1 version
but can you help me how to do the option 2?

image

what command i use to ssh to the palworld_backup_script.sh
i need ur help
thank you so much.

@ridwanaliah
Copy link
Author

image

what should i do next?

@ridwanaliah
Copy link
Author

can i copy paste this manually to my local desktop?

image

@ridwanaliah ridwanaliah changed the title How to get the backup of dedicated server save file on S3? How to get the backup of dedicated server save file on S3? can you guide me? Feb 15, 2024
@Josh-Tracy
Copy link
Contributor

Sorry for the late response.

Looking at your screenshot, it looks like you never got the backup script installed. I do not see the /palworld-server/palworld_backup_script.sh .That means the cron job was never setup either. Option 2 was for editing the backup script manually using vi or some other texte editor as outlined here: https://youtu.be/H0gGtPqhxco?si=8CwsubuxhYZI-qv4&t=334

If that file does not exist then your only option is to destroy the server and recreate it using version 1.1.1. Starting from here: https://youtu.be/H0gGtPqhxco?si=L1OIwfsIkaCVBQEj&t=1175 you an use SCP to move the SaveGame files off your EC2 instance onto your PC to save your data.

Then you can use the restore_from_backup option to start a new sever using your backup files. Be sure to follow the instructions in the README.md and restore_from_backup example. Make sure you get the DedicatedServerName from your GameUserSettings.ini file before you destroy the server.

@ridwanaliah
Copy link
Author

ridwanaliah commented Feb 15, 2024

If that file does not exist then your only option is to destroy the server and recreate it using version 1.1.1. Starting from here: https://youtu.be/H0gGtPqhxco?si=L1OIwfsIkaCVBQEj&t=1175 you an use SCP to move the SaveGame files off your EC2 instance onto your PC to save your data

I've tried this to scp it but it appears like this:

image

can you help me?

@Josh-Tracy
Copy link
Contributor

../../palworld_public_key is stating that you have the ssh key 2 directories/folders below the C:\Users\User\Desktop\Palworld-Terraform\ directory / folder. You have to provide the path to your SSH key relative to C:\Users\User\Desktop\Palworld-Terraform\.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants