Re: Empty backup directory
Daniel said on Tue, 29 Jun 2021 14:26:20 +0200 >On 28/6/21 16:40, Steve Litt wrote: >> Daniel said on Mon, 28 Jun 2021 14:58:10 +0200 >> > >I am actually also in the habit of saving files regularly via shortcut >mainly because I don't fully understand/trust LyX's auto saving >function. However, one case where this often fail is when I start a >new document of which I am don't expect it to end up being useful >after all. :-) We've all been there. :-) If I had a dime for every time a file called junk.py suddenly became important, I'd be a rich man. > So, I don't want to clutter my storage by saving the >document. The cool thing about my bupsky script is it automatically backs up the whole tree of the current directory, even things called junk.jnk. I have 14TB disk space so I never thought about the cost of backing up temporary files, but this thread has made me realize that a simple script to delete all trees not containing a file less than X days old would lessen the temptation to not back up junk files. I'll show you something: [slitt@mydesk ~]$ du -hs /scratch/bup 48G /scratch/bup [slitt@mydesk ~]$ Consuming 48G with ancient backups that are already backed up by my main backup system is inexcuseable. Soon I'll need to write a program to tree delete all trees with no files under X days old. The big challenge will be to include barriers to prevent deletion of young files if my clock goes bad, and also to prevent deletion of random directories (like /home/slitt for instance) if something bogus happens. Thanks for the idea. SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Empty backup directory
On 28/6/21 16:40, Steve Litt wrote: Daniel said on Mon, 28 Jun 2021 14:58:10 +0200 Thanks. I'll see whether I can make use of this. And indeed, as you mention, it seems not help with my original problem with backups before even saving a file in LyX. :-) I have the advantage of being old. Using Primos on a Prime computer in my youth, I learned to save on document creation, and then every 5 minutes thereafter, because I never knew when things would go south. So I never got in the habit of letting an application back up a document for me, and indeed am always confused when it offers to restore. Contrast this with applications' ability to undo multiple times, which saves my bacon every day of my life. By the way, on most applications save is either Ctrl+S or Alt+F->Save , so saving every few minutes doesn't interfere with my workflow or my concentration. SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques I am actually also in the habit of saving files regularly via shortcut mainly because I don't fully understand/trust LyX's auto saving function. However, one case where this often fail is when I start a new document of which I am don't expect it to end up being useful after all. So, I don't want to clutter my storage by saving the document. But I often miss the point at which a document becomes useful and worth saving then. In this case it would be great if not all is lost if LyX or my computer crashes at some point. -- Daniel -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Empty backup directory
Daniel said on Mon, 28 Jun 2021 14:58:10 +0200 > >Thanks. I'll see whether I can make use of this. And indeed, as you >mention, it seems not help with my original problem with backups >before even saving a file in LyX. :-) I have the advantage of being old. Using Primos on a Prime computer in my youth, I learned to save on document creation, and then every 5 minutes thereafter, because I never knew when things would go south. So I never got in the habit of letting an application back up a document for me, and indeed am always confused when it offers to restore. Contrast this with applications' ability to undo multiple times, which saves my bacon every day of my life. By the way, on most applications save is either Ctrl+S or Alt+F->Save , so saving every few minutes doesn't interfere with my workflow or my concentration. SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Empty backup directory
On 28/6/21 7:21, Steve Litt wrote: Daniel said on Sat, 26 Jun 2021 09:29:29 +0200 Hi, After installing LyX, the backup directory is empty (Preferences > Paths). Does that mean that no backups are created by default or that the backups are created even though "Backup documents, every ... minutes" is checked (Preferences > Look & Feel > Document Handling) (btw. Look & Feel seems a misnomer for backup settings). Or is a backup created in the directory of the lyx file (the title bar shows a directory even for new not yet saved files, so I suppose these files are backup there as well)? Hi Daniel, This isn't responsive to your exact question, but it still might be helpful... The way I've designed my workflow, backup is a multi-pronged strategy not depending on any one application (such as LyX). Obviously, one must regularly and frequently make complete backups of all their data, data being stuff they can't reinstall or re-download. This is the foundation of all backup. But you can't do that every hour, or every 10 minutes when you're working on a project. Git's pretty good for making backups every time a milestone is reached (perhaps completion of another chapter). But git isn't perfect: It takes an amount of time and concentration that could cause you to forget what you were writing about. I use a shellscript, called "bupsky", to back up at arbitrary moments so I don't get knocked back more than a few minutes when working continuously on a project. Here's bupsky: == #!/bin/sh buptrunk=/scratch/bup curdir=$(pwd | sed -e "s/.*\///") bupdir=$buptrunk/$curdir now=$(date +%Y%m%d_%H_%M_%S) src=../$curdir dst=$bupdir/${curdir}_$now if test ! -d $bupdir; then mkdir $bupdir fi cp -RpL $src $dst echo backup written to $dst == The preceding shellscript takes the current directory and the whole tree below it, can copies it. For instance, with my system, If I were working in ~/docs/mynewbook, then bupsky would take that directory and everything below it, and copy it to a directory something like /scratch/bup/mynewbook_20210627_16_01_21 . The timestamp enables me to roughly isolate *which* version is what I need. I'd anticipate bupsky being good between git commits, or between real backups when git or some other version control program isn't being used. Bupsky isn't optimal for trees containing huge files. Then again, backing up huge files in any way is suboptimal. Obviously, bupsky will eventually fill the disk if things aren't pruned. No problem, once every 2 weeks, run a program that searches every directory under the backup root (/scratch/bup in my case), and rm -rf on any tree not containing a file less than 8 days old, on the theory that by that time, you will have backed up all your data and don't need the bupsky-created directories anymore. Like I said, this isn't responsive to your question, but might be handy. SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques Thanks. I'll see whether I can make use of this. And indeed, as you mention, it seems not help with my original problem with backups before even saving a file in LyX. -- Daniel -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Empty backup directory
Daniel said on Sat, 26 Jun 2021 09:29:29 +0200 >Hi, > >After installing LyX, the backup directory is empty (Preferences > >Paths). Does that mean that no backups are created by default or that >the backups are created even though "Backup documents, every ... >minutes" is checked (Preferences > Look & Feel > Document Handling) >(btw. Look & Feel seems a misnomer for backup settings). Or is a >backup created in the directory of the lyx file (the title bar shows a >directory even for new not yet saved files, so I suppose these files >are backup there as well)? Hi Daniel, This isn't responsive to your exact question, but it still might be helpful... The way I've designed my workflow, backup is a multi-pronged strategy not depending on any one application (such as LyX). Obviously, one must regularly and frequently make complete backups of all their data, data being stuff they can't reinstall or re-download. This is the foundation of all backup. But you can't do that every hour, or every 10 minutes when you're working on a project. Git's pretty good for making backups every time a milestone is reached (perhaps completion of another chapter). But git isn't perfect: It takes an amount of time and concentration that could cause you to forget what you were writing about. I use a shellscript, called "bupsky", to back up at arbitrary moments so I don't get knocked back more than a few minutes when working continuously on a project. Here's bupsky: == #!/bin/sh buptrunk=/scratch/bup curdir=$(pwd | sed -e "s/.*\///") bupdir=$buptrunk/$curdir now=$(date +%Y%m%d_%H_%M_%S) src=../$curdir dst=$bupdir/${curdir}_$now if test ! -d $bupdir; then mkdir $bupdir fi cp -RpL $src $dst echo backup written to $dst == The preceding shellscript takes the current directory and the whole tree below it, can copies it. For instance, with my system, If I were working in ~/docs/mynewbook, then bupsky would take that directory and everything below it, and copy it to a directory something like /scratch/bup/mynewbook_20210627_16_01_21 . The timestamp enables me to roughly isolate *which* version is what I need. I'd anticipate bupsky being good between git commits, or between real backups when git or some other version control program isn't being used. Bupsky isn't optimal for trees containing huge files. Then again, backing up huge files in any way is suboptimal. Obviously, bupsky will eventually fill the disk if things aren't pruned. No problem, once every 2 weeks, run a program that searches every directory under the backup root (/scratch/bup in my case), and rm -rf on any tree not containing a file less than 8 days old, on the theory that by that time, you will have backed up all your data and don't need the bupsky-created directories anymore. Like I said, this isn't responsive to your question, but might be handy. SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Empty backup directory
On 2021-06-26 10:58, Kornel Benko wrote: Am Sat, 26 Jun 2021 09:29:29 +0200 schrieb Daniel : Hi, After installing LyX, the backup directory is empty (Preferences > Paths). Does that mean that no backups are created by default or that the backups are created even though "Backup documents, every ... minutes" is checked (Preferences > Look & Feel > Document Handling) (btw. Look & Feel seems a misnomer for backup settings). Or is a backup created in the directory of the lyx file (the title bar shows a directory even for new not yet saved files, so I suppose these files are backup there as well)? Daniel From what I understand, backups are created iff a lyx file changes while edited by lyx. Kornel I still find LyX's backups a bit confusing. Officially it says in the User Guide: "Backup original documents when saving creates a backup copy of the file in the state when it was opened or when it was saved the last time. It is stored in the Backup directory (see section [sec:Paths]) or in the same folder as your document if no Backup directory is specified. The backup file has the file extension “.lyx~”. With the option Backup documents, every, you can specify the time between backup saves. Save documents compressed by default always saves files in a compressed format (see also section [subsec:Compressed]). This applies to newly created documents only. The compression status of existing documents is not changed when saving." Sometimes there is a backup with the ".lyx˜" extension but sometimes with the ".lyx#" extension (as in "#filename.lyx#"). Contrary to the Guide, it seems as if the latter is the backup created automatically every 5 minutes by default. Also, they are not strictly speaking created every 5 minutes but only if in addition the document is the active one on LyX. That does not seem very safe. Then I find the ".lyx~" files in my directories. I guess they are created when LyX crashes? And maybe also in the case that Kornel mentions, if I understood it correctly, i.e. when a document that is edited in LyX is changed (externally)? It's all a bit confusing to me. Why are there different file extensions/names? Why does it periodically backup only when the document is active? What happens when LyX crashes with documents that have never been saved? Are there any backups created? Daniel -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Empty backup directory
On 6/26/21 3:29 AM, Daniel wrote: Hi, After installing LyX, the backup directory is empty (Preferences > Paths). Does that mean that no backups are created by default or that the backups are created even though "Backup documents, every ... minutes" is checked (Preferences > Look & Feel > Document Handling) (btw. Look & Feel seems a misnomer for backup settings). Or is a backup created in the directory of the lyx file (the title bar shows a directory even for new not yet saved files, so I suppose these files are backup there as well)? Daniel My backup directory path is empty and LyX automatically creates backups in the document's directory. The backups have the extension .lyx~, so they are considered "hidden files" by Mint, Ubuntu and I suspect other Linux distros. Paul -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Empty backup directory
Am Sat, 26 Jun 2021 09:29:29 +0200 schrieb Daniel : > Hi, > > After installing LyX, the backup directory is empty (Preferences > > Paths). Does that mean that no backups are created by default or that > the backups are created even though "Backup documents, every ... > minutes" is checked (Preferences > Look & Feel > Document Handling) > (btw. Look & Feel seems a misnomer for backup settings). Or is a backup > created in the directory of the lyx file (the title bar shows a > directory even for new not yet saved files, so I suppose these files are > backup there as well)? > > Daniel > From what I understand, backups are created iff a lyx file changes while edited by lyx. Kornel pgp06pA7VCrgo.pgp Description: Digitale Signatur von OpenPGP -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Empty backup directory
Hi, After installing LyX, the backup directory is empty (Preferences > Paths). Does that mean that no backups are created by default or that the backups are created even though "Backup documents, every ... minutes" is checked (Preferences > Look & Feel > Document Handling) (btw. Look & Feel seems a misnomer for backup settings). Or is a backup created in the directory of the lyx file (the title bar shows a directory even for new not yet saved files, so I suppose these files are backup there as well)? Daniel -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users