Trellis-Backup, an ansible role for local backups


#23

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:


#24

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:


#25

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)

#26

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)


#27

Exactly ! Using the backup tag is optional :slight_smile:

La France insoumise est mon employeur.


#28

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.


#29

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.


#30

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.


#31

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