Trellis-Backup, an ansible role for local backups

Hello, @guilro!

I have been having challenges with trellis-backup-role since updating to the Ansible 2.4 compatible version of Trellis.

Help? :slight_smile:

Hello @silumesii and everyone.

I am working on a new major version with a fork of Stouts.backup, it should be released today or tommorow :slight_smile:

1 Like

Hello everyone.

I released version 2.0.2 yesterday.

  • it works from scratch without creating a new mysql user, using the auth_socket plugin
  • paramiko depdency is removed (there is no support for scp by default)
4 Likes

Hi @guilro, your solution seems really a good one, thanks for the work (I think should thanks @MWDelaney too).

I have a question about where I’m supposed to insert roles in the server.yml file.

Here it says:

Run ansible-galaxy install -r requirements.yml to install the new roles.

Then, add the roles to the server.yml:

roles:

 other Trellis roles 


  • { role: trellis-backup, tags: [backup] }

Is the 
 other Trellis roles 
 are these in this part of the server.yml:

- name: WordPress Server - Install LEMP Stack with PHP 7.2 and MariaDB MySQL
  hosts: web:&{{ env }}
  become: yes
  roles:
     ... all list of roles ...
     - { role: wordpress-setup, tags: [wordpress, wordpress-setup, letsencrypt] }

Should I put the new role for backup at the end after worpress-setup (if the file wasn’t modify at this part of course)?

Thank you in advance

P.S. (surpris de voir le nom franceinsoumise comme dĂ©pendance
 j’ai dĂ» vĂ©rifier que c’était bien une dĂ©pendance et non un exemple de mise en situation de code)

Exactly ! Using the backup tag is optional :slight_smile:

La France insoumise est mon employeur.

Ok Thanks

Dommage pour les Ă©lections, c’était un bon programme, mes amis français ici au QuĂ©bec avaient fondĂ©s beaucoup d’espoir en ce parti et le mouvement. Gardez espoir.

Oh I forgot to ask, can we configure the purge to keep a number of backup, or it’s just true or false, I didn’t found information in Duply doc.

What Trellis-backup does is that it sets backup_mysql_user, backup_mysql_pass, and backup_profiles to correct values for trellis, and then runs https://github.com/lafranceinsoumise/ansible-backup which does all the job.

If you want to use other options of lafranceinsoumise.backup, you can set backup_max_age, backup_max_full_backups, backup_full_max_age in the vars of your playbook, they will be applied. Just check https://github.com/lafranceinsoumise/ansible-backup to see what settings fits your need.

Thanks a lot for your answer.

Ok, I checked ansible-backup doc, but something I’m not sure is: should I put vagrant as user or create a specific one?

Because I put a new user name and there is nothing in the backup folder where it supposed to drop the backup (local in file:///srv/www/website.com/current/web/app/trellis-backup).

Is there a way to see if it’s work correctly, I didn’t found any Duply folder or log in the VM?

Thanks again