Backing Up Config Files

Post Reply
tessando
OpenVpn Newbie
Posts: 4
Joined: Mon Aug 29, 2016 8:27 pm

Backing Up Config Files

Post by tessando » Mon Oct 30, 2017 3:51 pm

I'm running OpenVPN Access Server using the official AMI for AWS Ec2 (ami-fd67a590)

I recently upgraded from 2.1.1 to 2.1.12 using the in-place upgrade instructions.

When I follow the directions to backup the config files per the official documentation, I'm getting "Permission Denied".

Specifically, after I navigate to the correct directory I use this command:

Code: Select all

./bin/sqlite3 ./etc/db/config.db .dump > ./config.db.bak
and get the following result:

Code: Select all

mp > ./config.db.bak
-bash: ./config.db.bak: Permission denied
When I attempt to sudo, I get the same results.

What am I doing wrong? Is there a different command to be able backup these configuration files for this AMI?

Obviously a snapshot is the best "insurance policy", but I'd like to have confidence in upgrading our OpenVPN Server moving forward. If anyone has a good set of directions on how to setup these back-ups as a scheduled job, that would be awesome.

Thanks!

Tessando

novaflash
OpenVPN Expert
Posts: 493
Joined: Fri Apr 13, 2012 8:43 pm

Re: Backing Up Config Files

Post by novaflash » Mon Oct 30, 2017 7:37 pm

Hello Tessando,

The instructions were tested to work just fine. You must be root to use those commands. You say you tested with sudo. I suggest you do sudo su to gain root privileges, and then test again. If you still get problems even when you are in the identity of root, then that's a problem on your system, something to do with file permissions, not with the Access Server programs or the commands from the documentation website; those have been tested and are known to work 100%.

tessando
OpenVpn Newbie
Posts: 4
Joined: Mon Aug 29, 2016 8:27 pm

Re: Backing Up Config Files

Post by tessando » Tue Oct 31, 2017 7:56 pm

Thank you, Novaflash. When I changed the command to "sudo su" I was indeed able to backup those config files.

Thank you for your suggestion. This resolved my problem.

...

Post Reply