Untitled UI logotext
Solutions
WebsitesEcommerceMobile AppsWeb AppsProduction Support & Maintenance
Our work
Company
About usBlogPodcastContact us
Book a free consultation

How do I Automate Website File Backups?

Olivia Rhye

Automating Website File Backups

Admittedly, this is not the most exciting topic to some, but one of the greatest things about the ever-evolving tech landscape is how we continue to find ways to offload tasks that don’t need human attention to our machines. As web developers we find ourselves backing up site files and databases constantly. How can we automate this process to let the computer do the work for us? One solution is ansible. We can set up an ansible job in a backup.yml file like so:


---
- hosts: mysite
gather_facts: no
tasks:
- name: creating the zip file
command: zip -r mysite-files.zip .

- name: move the files from mysite to my computer
fetch:
src: mysite-files.zip
dest: tmp/mysite-files.zip
flat: yes



Ready to start a project?

Book a free consultation
Untitled UI logotext
Our work
About us
Blog
Careers
Submit a ticket
Agency Partnerships
Contact
© 2024 fjorge. All rights reserved.
Privacy