OPNsense Forum

Archive => 17.7 Legacy Series => Topic started by: Rayman on August 16, 2017, 08:27:42 pm

Title: Daily backup configuration on Google Drive
Post by: Rayman on August 16, 2017, 08:27:42 pm
Hi,

I have setup configuration backup on Google Drive. If I press save it backups to Google Drive fine.

I'm wondering if I can save the backups on a daily basis automatically. If yes, how?

Thanks,
Ray
Title: Re: Daily backup configuration on Google Drive
Post by: dpbklyn on October 02, 2017, 08:34:15 pm
Maybe not daily, but this would be useful...Is it possible to set up a cron job to get this done?
Title: Re: Daily backup configuration on Google Drive
Post by: rabievdm on October 04, 2017, 12:40:07 pm
Actually to be able to have scheduled backups to other media would be useful as well eg SCP/SFTP
Title: Re: Daily backup configuration on Google Drive
Post by: Olodin on October 04, 2017, 04:56:50 pm
Hi,
I'm using rsync over ssh to copy opnsense configuration from /conf to another host.

Just dropped a shell script to opnsense:/usr/local/etc/periodic/daily

Code: [Select]
#!/bin/sh
PATH=$PATH:/usr/local/bin:/usr/local/sbin
export PATH

/usr/local/bin/rsync -av /conf server:/backups/opnsense

You may need to install rsync via pkg add rsync and setup puplic-key authentication for user root.
Title: Re: Daily backup configuration on Google Drive
Post by: lysol on July 10, 2018, 03:59:56 pm
Also interested in a scheduling feature. My google drive backup is working fine, but I still have to do it manually.
Title: Re: Daily backup configuration on Google Drive
Post by: franco on July 11, 2018, 04:25:46 pm
Sure, this is easy:

https://github.com/opnsense/core/commit/9ca729b2

It allows to set a "Remote backup" cron job via the GUI. I'll add it to 18.1.12.


Cheers,
Franco
Title: Re: Daily backup configuration on Google Drive
Post by: fabian on July 11, 2018, 09:09:12 pm
(Off-Topic) The same is valid for Nextcloud - just a different name.
Title: Re: Daily backup configuration on Google Drive
Post by: franco on July 11, 2018, 10:17:03 pm
Yep, it works for all enabled backup methods. :)