You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At now in backup archive there are stored full path to backup items, so if I backup something like "/home/alice/myclients/client1/myprojects/project2", files are stored in archive in same long subfolder structure.
Will be good to have option to use only last directory name as folder name in destination archive file, can you add it? Also glad to see option to set custom name for each backup item.
The text was updated successfully, but these errors were encountered:
At now in backup archive there are stored full path to backup items, so if I backup something like "/home/alice/myclients/client1/myprojects/project2", files are stored in archive in same long subfolder structure.
Will be good to have option to use only last directory name as folder name in destination archive file, can you add it? Also glad to see option to set custom name for each backup item.
A possible solution could be to use the following tar option:
-C, --directory=DIR
change to directory DIR
I have not tested this, but i think the following should work. Backup all files and folders in the /etc and /home directory (relative paths):
backup_items=(
"-C /etc/ ."
"-C /home/ ."
)
I think it could be an issue, if there are items with the same name in these directories.
Setting custom name for each backup item can be implemented via Bash associative arrays, here is example:
declare -A backup_items
backup_items[etc]="/etc"
backup_items[mpd-logs]="/var/lib/mpd/"
glsysbackup currently supports bash version >= 3. Associative arrays are a feature pronounced in bash version 4. I will think about dropping support of bash version < 4.
At now in backup archive there are stored full path to backup items, so if I backup something like "/home/alice/myclients/client1/myprojects/project2", files are stored in archive in same long subfolder structure.
Will be good to have option to use only last directory name as folder name in destination archive file, can you add it? Also glad to see option to set custom name for each backup item.
The text was updated successfully, but these errors were encountered: