Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.comp.software.thunderbird > #16904

Re: Backup

From Paul <nospam@needed.invalid>
Newsgroups alt.comp.software.thunderbird
Subject Re: Backup
Date 2025-06-09 00:39 -0400
Organization A noiseless patient Spider
Message-ID <1025ohk$boh4$1@dont-email.me> (permalink)
References <lqU0Q.1207303$lZjd.630880@fx05.ams4> <1021oa9$35lpl$1@dont-email.me> <10225rn$393e0$2@dont-email.me> <1025mer$bc2v$1@dont-email.me>

Show all headers | View raw


On Mon, 6/9/2025 12:03 AM, NFN Smith wrote:
> J. P. Gilliver wrote:
>> On 2025/6/7 17:10:47, NFN Smith wrote:
>>> pablito wrote:
>>>> Is it possible to configure TB to do an automatic backup at a certain time ?
>>>> TNX
>>>
>>> Not within Thunderbird.  For that, the best bet is with some sort of external tool that supports scheduling.
>>
>> (Would be a good thing for the dev.s to add - especially to avoid the "running" aspect, and for those less savvy who don't know about things like %APPDATA%.)
>>
> 
> That would be nice, but I think that's one of the many things that won't appear in Thunderbird unless it first appears in Firefox.
> 
> In any case, the rule of thumb is that whether you're working in Thunderbird or Firefox (or for that matter, any other Mozilla-derived projects), it's always a good idea to shut down the app before you tinker with data inside a profile.
> 
> I've always been annoyed with locating profiles in %APPDATA% (or in Linux, $HOME/thunderbird or in MacOS, ~/Library/Thunderbird, all hidden folders), although I get the rationale that because that's all data that's intended to be interacted with through the relevant application, rather than directly. However, with Mozilla apps, there reasons to tinker with profile data, although something to go about carefully.
> 
>>> If you're working in Windows, what you want to get backed up is the contents of %APPDATA%\Thunderbird.  You don't have to copy to a different drive, just another location locally, although it's a good idea to make sure that Thunderbird is closed when you do it, so that you're not trying to make backups of open files.
>>
>> While we're stuck with using something external, is there some simple command (that could be put in a batch file) that will tell TB to shut itself down cleanly? (I envisage the batch file - which could then be scheduled - having the shutdown command, if we can contrive one, followed by the backup instruction.)>
> 
> There are a variety of approaches, and Paul has suggested more than one down-thread.  Although I've suggested copying, Paul correctly suggests that putting into a .ZIP archive is a good way.  Besides just getting a backup, that's an ideal approach if you're moving a profile to a new computer.
> 
> I agree that you don't have to use a formal backup tool, and depending on your skills with something like batch file programming in Windows or bash scripting in Linux or MacOS, it's not too hard to set up, including setting a script that will run through the Windows scheduler or a crontab job, including making sure you kill any active processes before you begin.
> 
> One consideration is that if your regular computer backups don't include all of your user data (even if you're not doing full system or bootable backups), because your Thunderbird data is in a hidden folder, then you have to explicitly include the Thunderbird data as part of your backup jobs.  In Linux, it's easy enough to get all of that data by specifying the $HOME directory, but you have to work harder for Windows and MacOS. For Windows, you can specify the absolute path to your profile (even if it doesn't show up when you're browsing from the Explorer), but the nice thing about using the %APPDATA% variable (or %APPDATA%\Thunderbird), it will always resolve to the correct location, and where you don't have to account for how your username is defined.
> 
> For what it's worth, I use Duplicati for backups of all of my platforms, Windows, Linux and MacOS, where they run late at night (when I'm not at the computer) off the appropriate schedulers. For Linux and Mac, I don't use them frequently enough that I normally leave applications open, but on Windows, I sometimes will leave an app (whether Thunderbird, Firefox or most likely, Seamonkey) open overnight, and I have never seen any issues with running a scheduled backup against an open profile.  By contrast, there are other applications, where if I happen to have them open when Duplicati runs, I get warning messages about files that are open (usually status files) and where those files don't get backed up. But I don't think I've seen any warnings about open files with any Mozilla apps.
> 
> For copying a profile that is a backup, it may not be a big thing to have an app open. On the other hand, for other tinkering inside a profile (i.e., changing file contents) it is advisable to close an app first. But if I'm making a backup manually, then I close the app as a matter of habit.
> 
> Smith
> 

I considered one other approach, but didn't put it in a post.

You can set a VSS Shadow Copy on Windows and that is what some
commercial backup software does. There are executables which
do not release their data files within the 10 second period,
and their files might not get backed up properly.

However, when I googled that, someone mentioned that a malformed
.sbd in Thunderbird, stopped that from working. My guess is,
the Thunderbird software may have been attempting to open the file,
and the operation never completed. Then, when the shadow was asserted
(and programs are expected to respond), there was an error indicating
that Thunderbird could not comply at the moment. The person reporting
this, had Thunderbird "repair" the .sbd and after that, the
shadow copy attempt started working again.

The complexity of the thing bothers me a bit. anybody could hit
the poor thing with a hammer, but you have to gather up the guts in
a bucket afterwards.

If Thunderbird is to be filled with "limitless wonders" as it is,
constantly changing and surprising us, maybe it needs

   thunderbird.exe --shutdown

added to the repertoire so that we make the application responsible
for our clean getaways.

I think the idea Andy posted, is pretty close, but I have to
set that up somewhere and play with it a bit, to make sure the
thing that has the "Write" compose window open, is the one being
hit and not the ContentProc. On Linux, you would have a PPID to work
with. My Windows tools are kinda divided on whether the platform has
a PPID (Parent Process ID). I don't see such a column choice in
Task Manager. I expect Microsoft isn't putting that in Task Manager,
to make it harder for us to kill MSEdge :-)

Now, this was a bit humorous. Points given for using a small mallet
and multiple whacks.

https://www.infopackets.com/news/10237/how-fix-gracefully-close-thunderbird-using-batch-script

   "You can use the following batch script to gracefully close 10 Thunderbird windows, then forcefully close it:

    @echo off

    for /l %%x in (1, 1, 10) do (
      rem echo Loop iteration count %%x
      taskkill /im thunderbird.exe       # The author of it, must be getting the "Write:" to close without saving ???
    )

    taskkill /f /im thunderbird.exe

I have a suspicion that would race as given, and maybe a few sleep(1)
should be put in there. You can never be too careful when working
with mallets.

   Paul

Back to alt.comp.software.thunderbird | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Backup pablito <abc@abc.bom> - 2025-06-07 12:23 +0200
  Re: Backup NFN Smith <worldoff9908@gmail.com> - 2025-06-07 09:10 -0700
    Re: Backup "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-06-07 21:01 +0100
      Re: Backup Paul <nospam@needed.invalid> - 2025-06-07 18:00 -0400
      Re: Backup NFN Smith <worldoff9908@gmail.com> - 2025-06-08 21:03 -0700
        Re: Backup Paul <nospam@needed.invalid> - 2025-06-09 00:39 -0400
          Re: Backup "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-06-09 11:52 +0100
            Re: Backup Paul <nospam@needed.invalid> - 2025-06-09 14:09 -0400
    Re: Backup Paul <nospam@needed.invalid> - 2025-06-07 16:04 -0400
  Re: Backup "David E. Ross" <nobody@nowhere.invalid> - 2025-06-07 09:22 -0700
  Re: Backup "Alan K." <alan@invalid.com> - 2025-06-07 16:38 -0400
    Re: Backup "Carlos E.R." <robin_listas@es.invalid> - 2025-06-08 00:10 +0200
      Re: Backup Paul <nospam@needed.invalid> - 2025-06-07 18:20 -0400
        Re: Backup "Alan K." <alan@invalid.com> - 2025-06-07 18:29 -0400
        Re: Backup Andy Burns <usenet@andyburns.uk> - 2025-06-08 04:21 +0100
          Re: Backup Paul <nospam@needed.invalid> - 2025-06-08 00:13 -0400

csiph-web