Clemens Schwaighofer
92225a588b
v4.9.0: forgejo backup v1.0.0
...
Add backup to forgejo like for gitea
2026-04-28 11:44:36 +09:00
Clemens Schwaighofer
924014688e
Update gitignore file with backup lock files
2025-12-04 09:57:54 +09:00
Clemens Schwaighofer
f9a58171cc
Bump version to v4.8.0
2025-12-04 09:35:08 +09:00
Clemens Schwaighofer
1b52af909a
Update PostgreSQL module to run as normal user with sudo for PostgreSQL
...
also clean up all PostgreSQL command calls as array type calls
clean up binary finder for postgresql installations
and add port/host override options
2025-12-04 09:28:57 +09:00
Clemens Schwaighofer
32a75626bb
Version number fixes
2025-12-03 15:49:45 +09:00
Clemens Schwaighofer
12ff648504
PostgreSQL backup hat wrong table selection
2025-12-03 15:31:55 +09:00
Clemens Schwaighofer
69be76e34c
Default settings file update for BACKUP_FILE
2025-12-03 14:48:54 +09:00
Clemens Schwaighofer
4a95049d4f
Default config file info update
2025-12-03 14:12:24 +09:00
Clemens Schwaighofer
d0e96a82e0
Clean up PostgreSQL call, clean up varify error block, ERR trap fixes
...
ERR trap is now returning last error so $? can bet used
Verify catches $? error now for INIT repository check
2025-12-03 14:00:49 +09:00
Clemens Schwaighofer
e5c5df6013
Fix error trap with return error to STD ERR
2025-12-03 13:08:35 +09:00
Clemens Schwaighofer
6023fac636
Fix trap clanup that also trapped ERR
2025-12-03 13:05:11 +09:00
Clemens Schwaighofer
9e0db8bae9
Fix the error trap with exit to stop calling it again with itself
2025-12-03 13:03:46 +09:00
Clemens Schwaighofer
8a8de773df
Change borg repository verify error message collection
2025-12-03 12:47:49 +09:00
Clemens Schwaighofer
f41dd1b723
Change verify command error check
2025-12-03 12:45:56 +09:00
Clemens Schwaighofer
c5d88a64e1
Fix last command check for verify
2025-12-03 12:43:52 +09:00
Clemens Schwaighofer
943d1c551e
Stop trapping errors und unset enviromant vars
...
On error just print error, but do not reset env vars, if this is done on verify error the init afterwards will store all settings in the wrong path
2025-12-03 12:38:01 +09:00
Clemens Schwaighofer
45e1e29d22
Update readme file with info about encryption
2025-12-02 10:01:37 +09:00
Clemens Schwaighofer
1f8d38720c
On info if verbose is set, print out the key too
2025-12-01 17:05:45 +09:00
Clemens Schwaighofer
7e4dc8d500
Clean up bash shell code and add proper ENCRYPTION support
...
- check for invalid encryption setting
- switch from none to keyfile type (without password)
- error for no password for repokey or authentication type encryption
- update init and print out the key file data
2025-12-01 16:53:50 +09:00
Clemens Schwaighofer
297c745df7
Borg MySQL backup: fix version detection for MariaDB variant
...
This one is from Debian 13
2025-09-18 09:58:51 +09:00
Clemens Schwaighofer
a2bf6b3331
Readme update for zabbix backup settings change
2025-08-21 10:40:56 +09:00
Clemens Schwaighofer
07896af1ae
Zabbix port override settings fix
...
use OPT var prefix for options
add missing init in functions init
2025-08-20 22:37:37 +09:00
Clemens Schwaighofer
8de971b922
Fix Zabbix db port override settings
2025-08-20 22:16:49 +09:00
Clemens Schwaighofer
e7699015c5
Allow override of zabbix db port
2025-08-20 22:14:19 +09:00
Clemens Schwaighofer
28dd6cb911
Merge branch 'master' into development
2024-09-04 10:38:58 +09:00
Clemens Schwaighofer
ab47692848
borg backup default settings file sample update
2024-09-04 10:37:36 +09:00
Clemens Schwaighofer
4267cb5b32
Bug Fix in gitea backup for temp dir check
2024-09-04 10:37:16 +09:00
Clemens Schwaighofer
f24daba195
Add shellcheckrc
2024-09-03 12:40:39 +09:00
Clemens Schwaighofer
98890b87f5
gitea module fix chown call
...
do not use ".", use ":" for username and group separator
2024-06-11 10:33:47 +09:00
Clemens Schwaighofer
a5bc90bb89
Text fix in PostgreSQL backup module
2024-06-10 09:52:06 +09:00
Clemens Schwaighofer
5af6a84d5f
Mysql/PostgreSQL module version string update
2024-06-07 15:08:49 +09:00
Clemens Schwaighofer
14d71f3053
Naming update for full update info text
2024-06-07 15:08:20 +09:00
Clemens Schwaighofer
24d4fb694f
Typo in postgresql module for full dump filename
2024-06-07 14:25:00 +09:00
Clemens Schwaighofer
f9fbbcc6de
Version fix for master script
2024-06-07 09:57:21 +09:00
Clemens Schwaighofer
64e876a9a4
Fix run time output template string
2024-06-07 09:56:51 +09:00
Clemens Schwaighofer
694e54ca9c
Missed out duration calculation in postgresql run time output
2024-06-07 09:16:52 +09:00
Clemens Schwaighofer
09bd6015ac
Version update for modules gitea, mysql, postgresql
2024-06-07 09:12:04 +09:00
Clemens Schwaighofer
5b8b0afec2
Fix not initialized new gitea variable names
2024-06-07 09:09:02 +09:00
Clemens Schwaighofer
0cc7e574fe
Borg backup update for gitea dump, mysql/postgresql info block
...
Gitea dump has now settings for
- temp folder (GITEA_TEMP_DIR)
- new name for working dir (GITEA_WORKING_DIR) from old (GITEA_TMP)
MySQL and PostgreSQL exports have a run time output per db dump set and not only at the end of the full run
2024-06-06 10:30:48 +09:00
Clemens Schwaighofer
beffbee20c
Add missing OPT_REMOTE to commands
...
check, compact commands had OPT_REMOTE missing
2023-05-10 16:30:23 +09:00
Clemens Schwaighofer
72f3f86eb6
Test for different command lookup check
2022-11-22 09:36:30 +09:00
Clemens Schwaighofer
c0f9634442
add *.compact to git ignore file
2022-11-14 20:27:42 +09:00
Clemens Schwaighofer
0e379d6ce0
Bump borg file module version number
2022-08-30 10:00:05 +09:00
Clemens Schwaighofer
bba8be6a42
Exclude File check is if file is >0 and fix wrong check for tmp file
...
Exclude file was only checked if it exists, even if it was empty it
would start processing.
In the exclude check there was also a wrong check for the tmp exclude
file, it actually checked if the main exclude file was >0 instead of the
tmp file.
2022-08-30 09:56:20 +09:00
Clemens Schwaighofer
ce3cdc7627
Readme update to fix Marktdown lint issues
2022-08-08 14:51:26 +09:00
Clemens Schwaighofer
67c0b00268
Initialize LAST COMPACT/CHECK date variable
2022-06-07 19:57:36 +09:00
Clemens Schwaighofer
abbcfa883f
Add compact auto run in intervals like check archive
...
Same settings like check archive in days. Auto set to 1 to run after
each prune. Can be controlled per module.
2022-06-06 14:58:36 +09:00
Clemens Schwaighofer
9739436589
Redirect STDERR output from borg backup to STDIN for ANSI code cleanup
...
gitea dump prints out info/status messages to STDERR. The whole
subprocess then returns this on STDERR and so is not parsed through the
sed regex command.
Redirect STDERR to STDIN
2022-05-31 09:54:56 +09:00
Clemens Schwaighofer
bf0364a0e7
Move lock file clean up to before any exit info is printed
...
Just try to clean lock file always on exit
2022-04-25 08:57:01 +09:00
Clemens Schwaighofer
8e87503528
Add auto check functionality
...
CHECK_INTERVAL or SUB_CHECK_INTERVAL in module settings.
If set to 1, will check everytime.
Ever other number is for n days after last check.
FORCE_CHECK for check if repository has been setup os now renamed
FORCE_VERIFY but FORCE_CHECK is currently still honored but deprecated
all *function* shell scripts will abort if run on their own
Print info on last check time if set in info block
Internal updates:
All separator lines are now printf strings for central control.
All module used config/settings file names use $MODULE name
Check functionality is in its own file
2022-04-25 06:49:57 +09:00
Clemens Schwaighofer
34277483e9
Borg check -p (progress) is only set if -v (verbose) flag is set
...
Avoid any progress output if run from script
2022-04-18 16:00:41 +09:00
Clemens Schwaighofer
dffb7c6450
Fix borg check prefix settings
2022-04-18 15:58:03 +09:00
Clemens Schwaighofer
2ae05f5302
Add borg check and rename options
...
Because we added borg check functionality, some of the Options have been
renamed:
-C -> -V
-E -> -e (as it is a sub)
-C: check
-y: --verify-data
-p: prefix or glob for check
Internal variables with CHECK have been renamed or changed to VERIFY
Borg -C without any extra parameters is equal to borg check.
-y adds the --verify-data and -p is a mix of the -P and -a options. If
there is a "*" in the option then -a will be used, else -P
Note that repair command has to be run manually. Run -C with -v
(verbose) to see the repair command structure.
borg check can take a long time on very large repositories.
2022-04-18 15:41:28 +09:00
Clemens Schwaighofer
b5ead9a2e1
Show host name and module init date in the start info block
2022-04-01 11:16:38 +09:00
Clemens Schwaighofer
fa77876440
Update Version ID to 4.2.4
2022-03-31 11:09:11 +09:00
Clemens Schwaighofer
f128b7ebc4
Bug fix for no keep options set check
2022-03-31 11:01:02 +09:00
Clemens Schwaighofer
77977207c8
Change close parameter check to pure string type
2022-03-31 09:21:23 +09:00
Clemens Schwaighofer
c1f6bb443a
Fix for close with empty parameter
2022-03-31 09:18:23 +09:00
Clemens Schwaighofer
86b0fa122a
Add empty KEEP option for error with -T
2022-03-30 20:27:46 +09:00
Clemens Schwaighofer
32c320be27
Fix close call int compare
2022-03-30 14:48:52 +09:00
Clemens Schwaighofer
500ab01790
Bug fix for unset var in close call
2022-03-30 11:35:19 +09:00
Clemens Schwaighofer
ab58ab3ad0
Update postgresql module version
2022-03-30 09:48:37 +09:00
Clemens Schwaighofer
7767eb58df
Override sudo for postgresql in upgrade script
2022-03-30 09:32:57 +09:00
Clemens Schwaighofer
38f467de96
PostgreSQL backup add schema or data dump in either default direction
2022-03-29 11:21:06 +09:00
Clemens Schwaighofer
8f91690f6a
Upgrade script for zabbix fix if no zabbix prefix set at all
2022-03-29 10:53:59 +09:00
Clemens Schwaighofer
e860573e0c
Fix upgrade script gitea module rename check
2022-03-29 10:28:26 +09:00
Clemens Schwaighofer
f990e86949
update script gitea block fix for missing module name
2022-03-29 10:25:12 +09:00
Clemens Schwaighofer
c929987900
variable name wrong for module check in upgrade script
2022-03-29 10:20:52 +09:00
Clemens Schwaighofer
6cb941818c
Repository ID via config only works with local repos, drop that and keep repo ID in -i option only
2022-03-29 10:01:00 +09:00
Clemens Schwaighofer
edaf41f1af
Repository ID info, borg command call via variable
...
The main info block gets Repository ID as info too (for cache/etc
folders check)
Missing borg command as variable for borg list command.
2022-03-29 09:57:12 +09:00
Clemens Schwaighofer
c7f2197614
add -E to sudo for upgrade script to keep enviroment variables for postgres run
2022-03-29 09:16:03 +09:00
Clemens Schwaighofer
88ea600e1d
Mising remote path option in update script
2022-03-29 08:55:19 +09:00
Clemens Schwaighofer
f396032728
Add remote override path for borg backup in update script
2022-03-29 08:53:37 +09:00
Clemens Schwaighofer
18cbcea2b0
Archive print page make archive space 45 chars wide
2022-03-29 07:01:31 +09:00
Clemens Schwaighofer
a0537a24d3
PostgreSQL sudo for upgrade script
2022-03-29 06:46:23 +09:00
Clemens Schwaighofer
89897eb676
Add base BORG export variables in upgrade script
2022-03-29 06:36:06 +09:00
Clemens Schwaighofer
e1787fcfb3
Add missing DEBUG var setting for borg update wrapper script
2022-03-28 12:37:33 +09:00
Clemens Schwaighofer
0ce5442bcf
Bug fix for update fix script
...
Add missing / for BASE_FOLDER if not set.
Dropped old file module borg name
2022-03-28 11:54:21 +09:00
Clemens Schwaighofer
d9346c84a7
Borg Backup wrapper Version 4.0 update
...
* file backup borg folder has now -file name inside. Old folder must be
manuall renamed
* All modules have the module id name as prefix in the backup set,
_borg_backup_set_prefix_cleanup.sh needs to be run before to clean up
all names or prune will not correctly delete old entries
New -T for one time target backup with custom prefix to have backups
outside the automated prune. -D option to delete this set
Add borg 1.2 support for compact which is called after delete and prune
to actually clean up the space.
-b borg executable and BORG_EXECUTEABLE override setting if borg is not
in path or another borg executable should be used
2022-03-28 11:27:35 +09:00
Clemens Schwaighofer
828a59c984
Set proper default values for core settings.
...
If nothing set in the settings file some entries need to be default set:
COMPRESSION
COMPRESSION_LEVEL
ENCRYPTION
FORCE_CHECK
KEEP_LAST
KEEP_HOURS
KEEP_DAYS
KEEP_WEEKS
KEEP_MONTHS
KEEP_YEARS
If these variables are empty after settings file is ready they are set
to the default value. After that the sub configs override those settings
2022-03-08 13:56:16 +09:00
Clemens Schwaighofer
ee1b3b23ab
Fixed missing init for OPT_COMPRESSION variable in functions check
2022-03-03 10:23:39 +09:00
Clemens Schwaighofer
fd5ee4be04
Just Version number adjustments in scripts
2022-01-06 09:42:16 +09:00
Clemens Schwaighofer
6dbf3497ea
Fix all BACKUP_SET_NAME call order
...
Set PREFIX before name so we can use the prefix in the db name to
always lock them.
Also fix BACKUP_SET_NAME for gitea backup
2021-12-20 15:38:50 +09:00
Clemens Schwaighofer
9d184f09f4
Bug fix for missing KEEP_MONTHS override check and double KEEP_LAST
...
No SUB_KEEP_MONTHS was ever set, but SUB_KEEP_LAST was checked twice
2021-12-16 13:59:05 +09:00
Clemens Schwaighofer
d26de19f92
Fix bug in Postgresql path check
2021-12-16 11:00:22 +09:00
Clemens Schwaighofer
252319848c
Fix zabbix dump var name, remove repository replace
...
in all BORG_* calls remove the REPOSITORY replace as the repository is
set beforehand for the module
Fix the ZABBIX_DUMP_BIN name in settings and check
2021-12-15 12:50:26 +09:00
Clemens Schwaighofer
49fb930c43
Update borg zabbix module info update
2021-12-14 12:55:47 +09:00
Clemens Schwaighofer
b0516bbe5c
Bug fix in zabbix backup module database type check
2021-12-14 12:49:59 +09:00
Clemens Schwaighofer
b42dab2af7
Update info for default backup keep, bug fix in convert time function
2021-12-14 12:41:06 +09:00
Clemens Schwaighofer
f0501baddb
Make zabbix settings backup module executeable
2021-12-14 12:34:16 +09:00
Clemens Schwaighofer
a0d06573ec
Zabbix settings backup, Readme update, base calls location move
...
New module for zabbix settings backup based on zabbix-dump
Move the _BORG_CALL and _BORG_PRUNE base calls to functions.check
instead of each module (they are all the same)
Update Readme file
Update default settings and remove KEEP so the original defaults are
used
2021-12-14 10:24:42 +09:00
Clemens Schwaighofer
ca8317079e
Add info to gitea backup module
2021-12-13 17:06:38 +09:00
Clemens Schwaighofer
b30073a984
Make gitea module executeable
2021-12-13 16:30:50 +09:00
Clemens Schwaighofer
967f97f313
Add gitea backup module
2021-12-13 16:29:02 +09:00
Clemens Schwaighofer
24f816e55c
Correct commands for settings group/folder rights and updated info
2021-12-13 13:52:59 +09:00
Clemens Schwaighofer
211645d919
Remove execute flag from borg.backup.file.settings-default
2021-12-13 13:22:18 +09:00
Clemens Schwaighofer
a661678441
Borg backup wrapper update, config update
...
Add a .gitignore for all other files that can appear in this
folder
(.config, .cache, settings files, etc)
Add backward compability check for file backup to
not auto add -file for
the file module unless flag is set
(FILE_REPOSITORY_COMPATIBLE)
2021-12-13 13:19:31 +09:00
Clemens Schwaighofer
93f8ea6054
Borg Backup Wrapper Scripts
2021-12-13 10:36:44 +09:00