Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi, I Would Like To Create Backups Of My Trains-Server Periodically. I Was Thinking About Creating A Service Task Under The Devops Project. The Backup Task Would:

Hi, I would like to create backups of my trains-server periodically. I was thinking about creating a service task under the devops project.
The backup task would:
Check if the disk has at least the size of the opt/trains folder of available space (so that the disk doesn't run out of space while we zip the /opt/trains folder) Create a zip of the /opt/trains folder Upload it to s3 under {PARAM_BACKUP_S3_BUCKET} / {PARAM_BACKUP_S3_KEY} / TRAINS_BACKUP_{TIMESTAMP} Sleep for {PARAM_BACKUP_INTERVAL_DAY}Now I have a question: Will that work? Is it possible that while creating the zip archive, one file gets corrupted (because it was being written by trains-server (redis, ES, etc.), and if yes, how to solve that?

  
  
Posted 3 years ago
Votes Newest

Answers 8


(Just to know if I should wait a bit or go with the first solution)

  
  
Posted 3 years ago

Are you planning to add a server-backup service task in the near future?

  
  
Posted 3 years ago

One solution is to shut-down the server and than do the backup (which won't work if you're running from a service task).

  
  
Posted 3 years ago

Another solution is to back-up the various database components using their respective CLIs (using mongo client for MongoDB, for example) and/or backup policies (each one has a different method for online backup that does not require services shut down).

  
  
Posted 3 years ago

ok, thanks SuccessfulKoala55 !

  
  
Posted 3 years ago

Will that work? Is it possible that while creating the zip archive, one file gets corrupted (because it was being written by trains-server (redis, ES, etc.)

That's exactly the problem 🙂

  
  
Posted 3 years ago

It's not something we're planning in the near future 🙂

  
  
Posted 3 years ago

Ok, I won't have time to venture to check the different database components, the first option (shuting down the server) sounds like the easiest option for me, I would then run manually the script once a month or so

  
  
Posted 3 years ago
1K Views
8 Answers
3 years ago
one year ago
Tags