Improve backup and restore scripts#303
Conversation
24748bd to
bd9904d
Compare
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.
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.
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.
|
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.