Conversation
bd9904d to
ac219e4
Compare
|
Should probably check if home or prefix are under each other, like if rootfs equals prefix |
|
Thank you! It's a good timing, I needed to back up and a restore a really large 42 GB Termux installation. I tested this PR by backing up and restoring from this PR version and everything worked great. I used this from my Termux home folder: Something I would like to note is that it was not able to back up my Any files I might have wanted to save from my root projects are not backed up by that. "projects" is quite general and could include many settings or data, for example the Bash History file of the root user in Termux. I saw errors like this: I wondered, if I were to use I think there is only a minor difference between what I as a user expected, and what happened, which is that I thought |
|
It back ups only original Termux prefix and home. It won't let override these directories through environment variables.
|
Major update for the backup script: * Backup home and usr by default * Support selective backup mode: either only home or only usr Support for piped output was dropped to maintain consistency with upcoming changes to termux-restore script. Support advanced Termux file system layouts allowed by rules from https://github.com/termux/termux-packages/blob/22641beab1a72fea849590e1b4b514d5720655b5/scripts/properties.sh#L917-L930
Major changes implied by updating termux-backup script: * Support restoring both home and usr at user discretion * Restore only usr by default * Support disabling --recursive-unlink tar behavior Support for piped input was dropped. It is not possible to seek piped tarball, therefore no reliable way to detect its contents and we can't make guesses because dealing with user data. Support advanced Termux file system layouts allowed by rules from https://github.com/termux/termux-packages/blob/22641beab1a72fea849590e1b4b514d5720655b5/scripts/properties.sh#L917-L930
ac219e4 to
47fee6a
Compare
* termux-backup: select $PREFIX contents only after permissions have been fixed and refuse to continue if a directory on the path to $HOME is not accessible. Previously 'nullglob' silently dropped contents of such directories from the archive. * termux-restore: do not alter permissions of files under $HOME when only $PREFIX is being restored. * termux-restore: pass --no-wildcards so $HOME path is always matched literally by --exclude.
cb208b9 to
00187cd
Compare
|
backup/restore updated to handle different file system layouts. |
…ected structure Prevents removal of files and directories that shouldn't be removed during cleanup.
00187cd to
330427c
Compare
Drop piped input and output in favor of maintaining versatile backup options. Breaking change but I don't think that removed pipe feature will be a big deal.