elkarbackup / elkarbackup-docs Goto Github PK
View Code? Open in Web Editor NEWElkarBackup docs
Home Page: http://docs.elkarbackup.org
ElkarBackup docs
Home Page: http://docs.elkarbackup.org
Here, the link "After the installation" points to "https://docs.elkarbackup.org/get-starting.html" and it should be "https://docs.elkarbackup.org/docs/getting-started.html"
Elkarbackup installation screencast for Debian 8 Jessie
Contents:
We need to explain better in docs the possibilities and issues you have when you want to preserve file permissions/ownership:
Rsnapshot makes an effort to keep permissions exactly as in the source files. This might cause some problems in Windows, so if you happen to have permission issues with windows jobs try setting this on. It might also make the backup up files unreadable for the web server.
Related: elkarbackup/elkarbackup#201
"sincronizar primero" aukeraren azalpena ez da zuzena [1]. Izan ere, sync_first erabiltzeko arrazoia eta kostua rsnapshot-en dokumentazioan agertzen direnak dira, eta ez besterik [2]:
sync_first 1
sync_first changes the behaviour of rsnapshot. When this is enabled, all calls to rsnapshot with various backup levels simply rotate files. All backups are handled by calling rsnapshot with the ``sync'' argument. The synced files are stored in a ``.sync'' directory under the snapshot_root.
This allows better recovery in the event that rsnapshot is interrupted in the middle of a sync operation, since the sync step and rotation steps are separated. This also means that you can easily run ``rsnapshot sync'' on the command line without fear of forcing all the other directories to rotate up. This benefit comes at the cost of one more snapshot worth of disk space. The default is 0 (off).
Laburbilduz, abantaila backupak seguruagoak direla da (ez da errotaziorik galtzen rsync eteten bada, adibidez) eta kostua berriz snapshot bat gehiago gordetzen dela (.sync ezkutua). Rsnapshot egikaritzeko moduan aldatzen da ere, baina detaile horretaz elkarbackup arduratzen da arazo gabe. Konkretuki, bezeroa azkarrago libratzen duela
Currently the following environment variables are documented:
ELKARBACKUP_LEVEL
ELKARBACKUP_EVENT
ELKARBACKUP_URL
ELKARBACKUP_ID
ELKARBACKUP_PATH
ELKARBACKUP_STATUS
The following envars are missing in the script creation section:
ELKARBACKUP_CLIENT_NAME: client name
ELKARBACKUP_JOB_NAME: job name (empty in client)
ELKARBACKUP_OWNER_EMAIL: job owner's email address (empty in client)
ELKARBACKUP_RECIPIENT_LIST: job recipients email addresses (empty in client)
ELKARBACKUP_CLIENT_TOTAL_SIZE: current client disk usage (in KB)
ELKARBACKUP_JOB_TOTAL_SIZE: current job disk usage (in KB, empty in client)
ELKARBACKUP_JOB_RUN_SIZE: data size backed up this run (in KB, empty in client)
ELKARBACKUP_CLIENT_STARTTIME: client backup start timestamp (only available in client scripts)
ELKARBACKUP_CLIENT_ENDTIME: client backup end timestamp (only available in post client scripts)
ELKARBACKUP_JOB_STARTTIME: job backup start timestamp (only available in job scripts)
ELKARBACKUP_JOB_ENDTIME: job backup end timestamp (only available in post job scripts)
ELKARBACKUP_SSH_ARGS: advanced arguments for ssh conection
We also could make it clear that the scripts are executed in the Elkarbackup server. If you need to run some code in the client, you need to do it by yourself in your script.
In that case, the following code might be helpful (change the ssh privkey path if you're on a Docker container):
#ELKARBACKUP_URL = user@serverip:/path
URL=`echo $ELKARBACKUP_URL | cut -d ":" -f1` # user@serverip
USER="${URL%@*}" # user
HOST="${URL#*@}" # host
SSHPARAMS="-i /var/lib/elkarbackup/.ssh/id_rsa -o StrictHostKeyChecking=no $ELKARBACKUP_SSH_ARGS"
# Run a commmand via SSH and return the exit code
function ssh_exec {
cmd="$1"
output="$(ssh $SSHPARAMS $USER@$HOST $cmd && echo $?)"
return $output
}
# Run a command via SSH and return the output
function ssh_exec_output {
cmd="$1"
output="$(ssh $SSHPARAMS $USER@$HOST $cmd)"
echo "$output"
}
Refere to https://github.com/elkarbackup/elkarbackup-scripts for more examples
We should add information about new API in v2.1.0:
Apparently is it possible to configure a Windows host without Cwrsync, using SSH + Rsync like linux hosts. Maybe we should test it and add it to our documentation.
From rsnapshot.org website:
Windows 10 native OpenSSH server and WSL2
For Windows 10 (1809+) machines, another option is to use the native OpenSSH server now available in Windows 10 1809 and WSL2. By using the native ssh server, WSL does not have to be running for the backup to occur.
- Install the native OpenSSH server in powershell.
- Key based access is still required and setup can be a bit strange, see the following StackOverflow post answer for what configuration steps are required.
- Install WSL2 and your Linux distribution of choice. Make sure rsync is installed and available in that distribution.
- Use WSL2โs rsync by including rsync_long_args='--rsync-path=wsl rsync' in the backup command. Take care with the single quote placement so the configuration will be executed correctly. By providing wsl rsync, this executes the rsync command in WSL instead of trying to execute it via Windows.
Example backup command configuration for Windows machines
This assumes that key based access for John Doe is properly configured on the remote system. (And that tabs are used between the fields)
backup 192.168.1.2:/mnt/c/users/John\ Doe/ johndoe/ rsync_long_args='--rsync-path=wsl rsync',ssh_args=-l 'John Doe'
Hello
I am translating the documentation into German and I have a question related to one string.
What means the following string here:
You can find an example of Script in the section "Script to compress the repository".
I am asking because I am not aware of such a section within Elkarbackup. Would you please assist?
Thank you so much...
Kind regards
//neph
Currently it's documented in the FAQ section:
https://github.com/elkarbackup/elkarbackup/wiki/FAQ#remotely-job-execution
We should add some reference (screenshot, example...) under the "Clients and jobs" section.
Dokumentazioan Elkarbackup GPLv3 lizentziapean banatzen dela esaten da
Kodean berriz, New-BSD jarrita dago
No rsnaphost will be published for Debian11, but Debian10 package works, so it must be downloaded and installed first.
I've recently upgraded a Elkarbackup server, from Stretch to Buster. I had some small issues and maybe we should publish a guide helping people in the same situation (I still don't know if it only happened to me):
Below I add some logs:
# After editing the sources.list, Debian recommends two-part upgrade process. So do I.
# https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#minimal-upgrade
$ apt update && apt upgrade
(...)
Preparing to unpack .../109-elkarbackup_2.0.1_all.deb ...
Unpacking elkarbackup (2.0.1) over (1.3.5) ...
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle/Resources/views/Default': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle/Resources/views': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle/Resources': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle/Lib': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo': Directory not empty
Setting up elkarbackup (2.0.1) ...
Configuration file '/etc/apache2/conf-available/elkarbackup.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** elkarbackup.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/apache2/conf-available/elkarbackup.conf ...
Configuration file '/etc/apache2/sites-available/elkarbackup.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** elkarbackup.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/apache2/sites-available/elkarbackup.conf ...
Installing new version of config file /etc/apache2/sites-available/elkarbackup-ssl.conf ...
Configuration file '/etc/cron.d/elkarbackup'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** elkarbackup (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/cron.d/elkarbackup ...
Using /etc/elkarbackup/parameters.yaml configuration ok
DB seems to be ready
Adding missing parameters as required
Delete cache content
Update DB
Create root user
Clean cache
Invalidate sessions
Setting permissions
apache2.service is not active, cannot reload.
invoke-rc.d: initscript apache2, action "reload" failed.
dpkg: error processing package elkarbackup (--configure):
installed elkarbackup package post-installation script subprocess returned error exit status 1
# It failed, but I guess it's because I need to do the dist-upgrade
$ apt dist-upgrade # (should I have typed "apt full-upgrade" ?)
Setting up elkarbackup (2.0.1) ...
Using /etc/elkarbackup/parameters.yaml configuration ok
DB seems to be ready
Adding missing parameters as required
Delete cache content
Update DB
Create root user
Clean cache
Invalidate sessions
Setting permissions
# Now the installation finished ok, but http://elkarbackup doesn't work
# I see the following error in the Apache logs:
[Wed May 05 14:14:22.001233 2021] [:error] [pid 4884] [client 192.168.10.1:36348] PHP Parse error: syntax error, unexpected '?' in /usr/share/elkarbackup/public/index.php on line 15
# Restarting Apache2 or rebooting the machine does not work either
# I looks is a problem related to PHP version. Let's check it:
root@elkarbackup:/usr/share/elkarbackup# ./bin/console about
-------------------- -------------------------------------------
Symfony
-------------------- -------------------------------------------
Version 4.4.20
Long-Term Support Yes
End of maintenance 11/2022
End of life 11/2023
-------------------- -------------------------------------------
Kernel
-------------------- -------------------------------------------
Type App\Kernel
Environment prod
Debug false
Charset UTF-8
Cache directory ./var/cache/prod (5.7 MiB)
Log directory ./var/log (657.3 MiB)
-------------------- -------------------------------------------
PHP
-------------------- -------------------------------------------
Version 7.3.27-1~deb10u1
Architecture 64 bits
Intl locale n/a
Timezone Europe/Berlin (2021-05-05T14:15:29+02:00)
OPcache true
APCu false
Xdebug false
-------------------- -------------------------------------------
Environment (.env)
-------------------- -------------------------------------------
APP_ENV prod
-------------------- -------------------------------------------
# The console looks good (it seems using php-cli?), but I discovered PHP5 was still loaded on my Apache2:
$ ls /etc/apache2/mods-enabled/
php5.load
php5.conf
# Let's fix that:
$ a2dismod php5
$ a2enmod php7.3
# YES, ELKARBACKUP IS WORKING
# We can delete all PHP5 related packages from our system
apt remove php5*
apt autoremove
systemctl restart apache2
There is still one more issue.
I don't see my current parameters.yml value on "Parameters" form.
UPDATE: actually it's an issue elkarbackup/elkarbackup#538
cd /usr/share/elkarbackup
./bin/console cache:clear
TO BE CONTINUED
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.