I currently manually backup my snap following https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps/#how-do-i-backup-my-snap-data
I can run a cron nightly to create this backup, but I’d like to automate all of it with a bash script so as to be able to rsync or scp to a remote server. Essentially covering this:
- Script stops the server then runs: snap run rocketchat-server.backupdb
- Script takes the command’s output A backup of your data can be found at “/var/snap/rocketchat-server/xxxx/backup.tgz” as source for the scp.
- scp executed
- script starts server again.
I can do 1, 3 and 4, but unsure of how to handle 2) section. Also is it really necessary to stop the server running, or is this just extra safety to avoid database corruption?