Comments (6)
I run my portainer backup nightly using a HTTPS (secure) connection.
Are you using a self-signed certificate? I'm using a Let's Encrypt certificate so if you are using a self-signed certificate, perhaps that's the difference.
from portainer-backup.
Hi @savageautomate ,
Thanks for the response.
I am using self signed certificates. After a couple of days of no progress in solving the issue I have now managed to work around it by placing the portainer_backup container on the same docker network as the portainer container and then using the legacy HTTP connection.
I've added a copy of my compose file here in case it can help anyone else struggling with the same problem.
Thanks for a great utility :-)
version: '3'
# Checkout the backup software here: https://github.com/SavageSoftware/portainer-backup.git
services:
portainer-backup:
container_name: portainer-backup
image: savagesoftware/portainer-backup:latest
user: ${UID}:${GID}
restart: unless-stopped
command: schedule
environment:
TZ: Europe/London
PORTAINER_BACKUP_URL: "http://portainer:9000"
PORTAINER_BACKUP_TOKEN: "PORTAINER_ACCESS_TOKEN"
PORTAINER_BACKUP_PASSWORD: "xxx"
PORTAINER_BACKUP_OVERWRITE: 1
PORTAINER_BACKUP_SCHEDULE: "0 0 4 * * *"
PORTAINER_BACKUP_STACKS: 0
PORTAINER_BACKUP_DRYRUN: 0
PORTAINER_BACKUP_CONCISE: 1
PORTAINER_BACKUP_DIRECTORY: "/backup"
PORTAINER_BACKUP_FILENAME: "{{DATETIME}}-portainer-backup.tar.gz"
volumes:
- /etc/localtime:/etc/localtime:ro
- backup:/backup:rw
networks:
- portainer_default
volumes:
# Mount a CIFS folder on dixnas1.lan for backups
backup:
driver: local
driver_opts:
type: cifs
o: username=${BACKUP_USER},password=${BACKUP_PASSWD},rw,uid=${UID},gid=${GID},vers=3.0
device: "\\\\192.168.1.1\\DockerBackups\\Portainer"
networks:
portainer_default:
external: true
from portainer-backup.
I faced the same issue, my portainer uses a cert signer with my local root CA which is configured in the cert store of the server. I tried to map the local /etc/ssl/certs which contains my local root CA into the portainer-backup docker container, but no success. Seems that the backup software is not using the cert store from Alpine llinux.
from portainer-backup.
Any plans on supporting self signed certificates. Environment variables with rootCA path can be implemented.
from portainer-backup.
Thank you, the hint with the network helped me to get this running in my LAN. I first tried to add my local dns (--dns "MYDNSIP" ) which did not help either find my local portainer, although it's using let's encrypt certs.
from portainer-backup.
I've found a workaround for this issue.
Since its written in nodejs and uses https lib for requests we can just add environment variable NODE_TLS_REJECT_UNAUTHORIZED to ignore certificate.
services:
portainer-backup:
environment:
PORTAINER_BACKUP_URL: "https://portainer:9443"
NODE_TLS_REJECT_UNAUTHORIZED: 0
Same goes for cli
NODE_TLS_REJECT_UNAUTHORIZED=0 npx portainer-backup info --url "https://portainer:9443" -t "blah"
from portainer-backup.
Related Issues (16)
- Add linux/arm docker platform HOT 3
- Test backup on running/scheduled docker container
- Stacks with duplicate names
- Licensing clarification HOT 1
- Unable to access portainer with http HOT 2
- Feature request: Backup into ZIP and keep_days HOT 1
- Cannot run via docker-compose: Error: Cannot find module '/portainer-backup/src/index.js
- Can't connect to portainer
- " quotes in field values causing issues
- Connection to Portainer Server Failed! HOT 9
- {{DATE}} not updating the folder path using scheduled run HOT 6
- Scheduling stacks HOT 1
- Add PORTAINER_BACKUP_TOKEN_FILE to allow using secrets for token
- [Feature Request] Keep N backups HOT 9
- [FR] Compose folder should include stack names, instead of numbers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portainer-backup.