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

Question on operation with B2 #41

Open
N-Upchurch opened this issue Jul 12, 2021 · 4 comments
Open

Question on operation with B2 #41

N-Upchurch opened this issue Jul 12, 2021 · 4 comments

Comments

@N-Upchurch
Copy link

Hi there, I'm wondering if there is some further documentation on using Archivist? It does not appear to be working, and I'm not sure whether I have done everything that I was supposed to do. I am assuming archivist will run when I generate a backup on YunoHost?

So far, I have taken the following steps:

  1. Install Archivist via YunoHost
  2. Configure Backup_list.conf (see below)
  3. Download B2 tool
  4. Created authorized user for B2
  5. Set up alias for B2 tool (b2="~/b2-linux")
  6. Run a YunoHost backup using web interface

Config:

## OPTIONS

# Backup directory.
backup_dir=/home/yunohost.app/archivist/backup

# Encrypted backup directory.
# Usually just next to the backup directory
enc_backup_dir=/home/yunohost.app/archivist/encrypted_backup

# Encryption
# true/false
encrypt=false
# Password for encryption
# This file should be set at chmod 400
cryptpass=na

# Compression algorithm to use
# gzip
#   Standard compression algorithm.
#   Fast and light on ressources.
# lzop
#   Very fast algorithm.
#   Low efficency
# zstd
#   Zstandard algorithm
#   Similar to gzip but faster
# bzip2
#   Very slow but very effective.
#   Light on ressources.
# lzma
#   Faster than bzip2 and even more effective.
#   But demanding in resources.
# lzip
#   Similar to lzma.
# xz
#   Similar to lzma but more recent.
#
# none
#   No compression
#   Concatenation in a tar file only
# symlink
#   No compression
#   Symbolic link to the YunoHost tar file from /home/yunohost.backup/archives
#   The symbolic link is used only for the local $backup_dir of archivist.
#   Real tar files are send to recipients.
#
#   This mode allow archivist to not duplicate locally the backup if not compressed.
#   WARNING: Does not work with encryption !
#
# Default: gzip
ynh_compression_mode=gzip
files_compression_mode=gzip

# --------------------------------------------------------------------------------------
## YUNOHOST BACKUPS

# YunoHost backups
# Specific backup made by 'yunohost backup' command
# ynh_core_backup=true/false: Make a backup of the core of YunoHost, without any apps.
ynh_core_backup=true
ynh_core_pre_backup=
ynh_core_post_backup=

# ynh_app_backup=APP: Make a backup of an app.
# You can add as many lines as you want to save multiple apps.
# List all apps with sudo yunohost app list --installed | grep "id: "
# ynh_app_backup=wordpress
# If you don't want an app with a lot of data to backup those big files, please add 'do_not_backup_data' after the app name.
# ynh_app_backup=transmission do_not_backup_data
ynh_app_pre_backup=
ynh_app_post_backup=
ynh_app_backup=alltube
ynh_app_backup=archivist
ynh_app_backup=cryptpad
ynh_app_backup=element
ynh_app_backup=encryptic
ynh_app_backup=gitea
ynh_app_backup=grocy
ynh_app_backup=lstu
ynh_app_backup=lufi
ynh_app_backup=piwigo
ynh_app_backup=rainloop
ynh_app_backup=restic
ynh_app_backup=searx
ynh_app_backup=strut
ynh_app_backup=synapse
ynh_app_backup=ttrss
ynh_app_backup=wallabag2
ynh_app_backup=zerobin
ynh_app_backup=

# --------------------------------------------------------------------------------------
## FILES BACKUPS

# Max size for each backup in Mb.
# Be carreful, it's only a soft limit, that means the script will try to limit each backup.
# Because, it will never made more than one backup for a single directory 
# (Even if it's a real big directory without subdirectories). 
# And the same if there's files next to subdirectories, only one backup will be made for all this files.
max_size=1000

# Backup of files and directories
# Add as many lines as you want for each directory or file you want to be backuped.
# Exclude a directory, a file, or multiples files with a regex with the exclude_backup instruction.
# file_to_backup="/directory/to backup"
# file_to_backup=/file/to backup
# exclude_backup="/directory/to exclude"
# exclude_backup=/file/to exclude
# exclude_backup="/exclude/all/tarball/in_this_directory/.tar.gz$"
files_pre_backup=
files_post_backup=
file_to_backup=
exclude_backup=

# --------------------------------------------------------------------------------------
## BACKUPS RECIPIENTS

# All options following a recipient name will be enabled for this recipient only.
# > recipient name=Name of this recipient.
# type=Choose between one of the scripts in the "senders" directory.
# destination directory=Directory where to put the backup in the other side.
# encrypt=Override main option for encryption. (true/false) (Optionnal option)
# specific option for type=See the chosen script to know what's the options.
# exclude backup=Exclude a backup file or a directory from the backup. This option can be duplicated. (Optionnal option)
# include backup=Choose the only file or directory which be send. This option can be duplicated. (Optionnal option)

# > recipient name=local example
# type=local
# destination directory=/my/local/backup
# encrypt=false
# pre_backup=
# post_backup=
# exclude backup=/exclude/dir
# include backup=

# > recipient name=rsync ssh example
# type=rsync_ssh
# destination directory=backup
# encrypt=false
# ssh_host=domain.tld
# ssh_user=user
# ssh_port=22
# ssh_key=/home/user/.ssh/id_rsa
# ssh_pwd=
# ssh_options=
# pre_backup=
# post_backup=
# exclude backup=/exclude/dir
# include backup=

 > recipient name=[B2 NAME]
 type=b2
 destination directory=/
 encrypt=false
 b2_bucket=[BUCKET NAME]
# pre_backup=
# post_backup=
# exclude backup=/exclude/dir
# include backup=

@maniackcrudelis
Copy link
Contributor

Hi N-Upchurch

I don't know the steps for B2, that it didn't implement nor that I use, but Archivist is not triggered by YunoHost backups. That's actually the opposite, Archivist does trig YunoHost backups.

Regarding your config file, you do backup only YunoHost backups, nothing else.
What's gonna happen is that Archivist will run the YunoHost commands to do the backups you asked for.

I don't know what frequency you choose for your backup, that's in the cron file /etc/cron.d/archivist, which is configured by default to start once a week.

Meanwhile you can start a backup with Archivist from the action panel, into the admin panel, or from a command line by running

sudo /opt/yunohost/archivist/archivist.sh

Hope that answer your question ;)

@N-Upchurch
Copy link
Author

Thanks very much; that's helpful information. Do you know whether there is any documentation at all on how to enable the recipients at the bottom of the config ? I could start there to try and get B2 working.

@maniackcrudelis
Copy link
Contributor

The only documentation I can think of is that small part right there, https://github.com/maniackcrudelis/archivist/blob/master/Configuration.md#senders

There isn't much about B2 though.

@N-Upchurch
Copy link
Author

Ok, thanks. I'll report back with my config if I get it working. I appreciate your help!

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

No branches or pull requests

2 participants