Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a copy of config before overriding it #157

Conversation

jjromannet
Copy link
Contributor

@jjromannet jjromannet commented Feb 9, 2022

Does not work (current latest image)

# create test config
print "version: 2\nbackends:\n  localtmp:\n    type: local\n    path: /tmp/backup-backend\nlocations:\n  data:\n    from:\n    - /data/\n    to:\n    - localtmp" | tee test-config.yaml

# autorestic check 
docker run --rm -v $(pwd):/data cupcakearmy/autorestic autorestic -c /data/test-config.yaml check -v

# list all files matching pattern
ls -l test-config.*

output (no file with .old extension) :

janr@Jans-MacBook-Pro autorestic % ls -l test-config.*
-rw-r--r--  1 janr  staff  232 Feb  9 20:47 test-config.yaml

Working:

# build from branch sources
docker build -t local-autorestic .

# create test config
print "version: 2\nbackends:\n  localtmp:\n    type: local\n    path: /tmp/backup-backend\nlocations:\n  data:\n    from:\n    - /data/\n    to:\n    - localtmp" | tee test-config.yaml

# autorestic check 
docker run --rm -v $(pwd):/data local-autorestic autorestic -c /data/test-config.yaml check -v

# list all files matching pattern
ls -l test-config.*

output:

Everything is fine.
janr@Jans-MacBook-Pro autorestic % ls -l test-config.*
-rw-r--r--  1 janr  staff  239 Feb  9 20:52 test-config.yaml
-rw-r--r--  1 janr  staff  144 Feb  9 20:52 test-config.yaml.old
janr@Jans-MacBook-Pro autorestic % 

@vercel
Copy link

vercel bot commented Feb 9, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/cupcakearmy/autorestic/EkFK679akCTA7FuQQFZmxj3SLBnZ
✅ Preview: https://autorestic-git-fork-jjromannet-fix-copy-conf-4aef5c-cupcakearmy.vercel.app

@cupcakearmy cupcakearmy merged commit 8e1fe6a into cupcakearmy:master Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants