New User Question: Running BiT Snapshots via Command Line/Script
I have just set up Backintime here, have set up some profiles, and am running snapshot jobs from the GUI; they seem to work fine. Running on a laptop (Fedora 39) with snapshots directed to an NFS-mounted Network Stoarage Applicance (NAS). I do not wish to add an external disk to the laptop, for laptop portability reasons. The laptop is (1) not always turned on and (2) not always at home where the NAS is available, so I need to run the jobs manually and can't use cron jobs. Ideally, I'd like to be able to run the jobs at the bash command line prompt; even better would be to run them via a script. Where/how can I find the full command line that runs a snapshot defined in a profile? Thanks.
Dear Tim, I would say there is no need to run BIT manually. I do my backup jobs also with to a NAS that is not always on. BIT will retry it based on the schedule options you set up. But if you want to start BIT from command line this is possible. Have a look at the man page "backintime". Here is an online version: <https://manpages.debian.org/buster/backintime-common/backintime.1.en.html> Kind Christian
Basically you just need to know the profile "number" (1 is the default profile AFAIR) to start a backup backintime --profile-id 1 backup The tricky part is error handling (if you want to get informed automatically if the backup fails). This can be done via "user-callback" bash scripts that are called for designated backintime events. Here you can find some docs + example user-callback scripts: https://github.com/bit-team/user-callback On Sun, 2023-12-10 at 11:43 -0500, Tim Evans wrote:
I have just set up Backintime here, have set up some profiles, and am running snapshot jobs from the GUI; they seem to work fine.
Running on a laptop (Fedora 39) with snapshots directed to an NFS-mounted Network Stoarage Applicance (NAS). I do not wish to add an external disk to the laptop, for laptop portability reasons.
The laptop is (1) not always turned on and (2) not always at home where the NAS is available, so I need to run the jobs manually and can't use cron jobs.
Ideally, I'd like to be able to run the jobs at the bash command line prompt; even better would be to run them via a script.
Where/how can I find the full command line that runs a snapshot defined in a profile?
Thanks. _______________________________________________ Bit-dev mailing list -- bit-dev@python.org To unsubscribe send an email to bit-dev-leave@python.org https://mail.python.org/mailman3/lists/bit-dev.python.org/ Member address: python@altfeld-im.de
On 12/11/23 17:21, BiT dev wrote:
Basically you just need to know the profile "number" (1 is the default profile AFAIR) to start a backup
backintime --profile-id 1 backup
Thanks. So something as simple as this would script my three profiles (which are working via the GUI): mount /NAS-filesystem #defined in /etc/fstab for profile in "Main profile" boot home do backintime --profile $profile backup done umount /NAS-filesystem Right? BTW, can the name "Main profile" (the first one created by the GUI) be changed to be more meaningful? In my case, to "root"
Dear Tim, thanks for asking. Am 12.12.2023 17:16 schrieb Tim Evans:
BTW, can the name "Main profile" (the first one created by the GUI) be changed to be more meaningful? In my case, to "root"
Currently it is not possible to rename or delete the first profile. You can just ignore it and create a second profile. We have an open Issue about that problem: https://github.com/bit-team/backintime/issues/1495
participants (3)
-
BiT dev
-
c.buhtz@posteo.jp
-
Tim Evans