AllStarLink / asl3-menu

This repository contains the ASL3 menu system
GNU Affero General Public License v3.0
3 stars 0 forks source link

Option to configure savenode.conf #16

Closed tsawyer closed 6 months ago

tsawyer commented 6 months ago

When backup to backup.allstarlink.org is selected present an option to enable in savenode.conf if not already enabled.

Allan-N commented 6 months ago

node-setup already knew how to update the node number and password in "savenode.conf". But, the support wasn't multi-node aware and never marked the configuration as enabled. I'm making a few minor changes to address these two issues.

Note: we can certainly provide "more" backup configuration management at a later date.

tsawyer commented 6 months ago

Backups need not be "multi-node" aware. Backup simply saves the entire /etc/asterisk/.

Allan-N commented 6 months ago

For backup/restore we have the node number and its associated password set into "savenode.conf". In a multi-node configuration (e.g. 1001, 1002) we had been saving the last updated password to the file regardless of what node it was associated with. This could result in breaking a paired node/password. The update I already pushed will ensure that we don't break the pair (if node 1001 is in the .conf then updating the password for node 1002 will not have any effect(.

What's missing (TODO) is having a way to switch what node/password is used for backup/restore (e.g. switching from node 1001 to 1002).

tsawyer commented 6 months ago

The simplest way to do this is the way it has always been done. The first node configured is the backup login. Doing anything else leaves a mess on the backup server.

Saving backups with private node number (numbers under 1999 or starting with 1) login is unsafe because they are not unique.

Allan-N commented 6 months ago

The simplest way to do this is the way it has always been done. The first node configured is the backup login.

and that's what we're doing ... until someone removes the initial node. Need to do something smarter when/if this happens.

Saving backups with private node number (numbers under 1999 or starting with 1) login is unsafe because they are not unique.

Q? should I "disable" backups/restores if node#<2000 ?

tsawyer commented 6 months ago

someone removes the initial node. Need to do something smarter when/if this happens.

That will require an API on the backup server.

Q? should I "disable" backups/restores if node#<2000 ?

Private nodes do not have a ASL valid password which prevents them from using the backup server. But yes, it's a good idea to prohibit node numbers < 2000 and any node number that begins with number 1.

The rule preventing node numbers beginning with a 1 is because people have found that can create a number with more than 4 digits if it starts with a 1.

Allan-N commented 6 months ago

Q? does the backup server had an API to remove a stored image?

So, there are no valid node #'s that start with a "1" (e.g. 11111, 11112, 12345, ...) ? Interesting.

... and I can certainly block backups from node #'s that are < 2000 or start with a "1"

tsawyer commented 6 months ago

Q? does the backup server had an API to remove a stored image?

It has no APIs.

So, there are no valid node #'s that start with a "1" (e.g. 11111, 11112, 12345, ...) ?

Correct.

Allan-N commented 6 months ago

OK. I will "disable" backups/restores if node#<2000 and for node #'s that start with a "1".