|
|
|
05-27-2021, 11:48 AM
|
#81
|
Human being with feelings
Join Date: Nov 2016
Posts: 37
|
Request +1
Would be a welcome addition. +1
|
|
|
07-23-2021, 03:46 AM
|
#82
|
Human being with feelings
Join Date: Jun 2019
Posts: 2,875
|
Bump.
|
|
|
07-23-2021, 04:58 AM
|
#83
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Script: Save project and keep only X backups
Hi everyone,
After an extensive long period of testing, I think I can safely release my script mentioned above.
I was a bit hesitant cause a script which delete project files (even backups) is a bit... sensitive.
Detecting what are backup files of a project is made my checking files in its folder and checking their name. The pattern matching used by the script to find backups files is very strict so I didn't had any issue.
Code:
"^" .. proj_name .. "%-(%d%d%d%d%-%d%d%-%d%d_%d%d%d%d%d%d)%.rpp%-bak
(where ^is begining of file name, %d are numbers, proj_name the project file name without extension etc. So it is pretty strict!)
Be sure to have Timestamp backup activated in Option -> Project -> Saving.
The script has been released in my free reapack repo as:
- X-Raym_Save project and keep only X backups.lua
Map it to CTRL+S keyword shortcut for eg, or/and place it in your File menu.
Demo:
Default is set to 5. You can use a preset script if you want to alter the value (better than editing the file cause compatible with future update).
https://gist.github.com/X-Raym/f7f63...ile-preset-lua
It would be simpler if I added some kind of popup setting but it is the kind of set and forget thing so I didn't bother such things.
Let me know if it works as expected!
And feel free to make a donation if you like it :P
PS: Because of it's importance and sensitivity, I still do think this feature should be native, in preferences, as good as my script can be :P
Last edited by X-Raym; 07-23-2021 at 07:39 AM.
|
|
|
07-23-2021, 06:53 AM
|
#84
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,792
|
When I run the script it saves my project but did not delete any files here on windows 10 Reaper v6.33rc3
ReaScript Name: Save project and keep only X backups Version: 1.0.4
Last edited by Coachz; 07-23-2021 at 07:33 AM.
|
|
|
07-23-2021, 07:30 AM
|
#85
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Coachz
As explain above the pattern is very strict.
it should be in
here are what it looks like on my hand: project_name-2021-07-23_134824
I have second precision, you don't have it.
note sure what you don't have the same pattern. Probably check Timestamp in settings ?
(off topic, but please unquote my message from your previous post, it clutter the discussion a bit :P)
|
|
|
07-23-2021, 07:36 AM
|
#86
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,792
|
As usual, you are right. :-) I enabled the timestamp backup option and it works great. Thank you for the really helpful script. I also uncluttered the previous post. Rock on !
Last edited by Coachz; 07-23-2021 at 07:47 AM.
|
|
|
07-23-2021, 07:38 AM
|
#87
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@coachz
But you haven't unclutter this one haha 😅
No need to quote if the related post is just the one before :P
Anyway, glad it works for you. Once it will be set to your favorite save keyboard shortcut, you will not even notice it is here.
|
|
|
07-23-2021, 07:49 AM
|
#88
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,792
|
Excellent, I won't know it's there but I can still see you ! :-)
|
|
|
07-23-2021, 11:32 AM
|
#89
|
Human being with feelings
Join Date: Jun 2020
Posts: 666
|
Thanks for this X-Raym, I just deleted like 3k .rpp-bak files yesterday so I'll def try it out.
One thing, does it work if I have a separate folder? I have the option to save to a separate path called "BACKUPS" in the same project folder but it doesn't seem to acknowledge this, is there a way around this for it to work with that path?
|
|
|
07-23-2021, 01:02 PM
|
#90
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@tonalstates
There is a variable in USER CONFIG AREA of the script where you can put subfolder name. This can be hooked by a preset file, which is better than direct script editing to allow future update.
Check link about preset script above.
I didn't retest the subfolder feature for a while but hopefully it works as expected.
|
|
|
07-24-2021, 01:37 PM
|
#91
|
Human being with feelings
Join Date: Jul 2020
Posts: 725
|
Quote:
Originally Posted by X-Raym
Let me know if it works as expected!
And feel free to make a donation if you like it :P
|
I tried to make this work since I couldn't get amalgamas script to work, but something I don't really understand in the script is the
backup_folder = "backup" -- Without separator.
line.
When I try to add the address to my backup folder in the line beneath (backup_folder = "E:\Jon Backup\REAPER\TEMP\REAPER BACKUPS") and press Ctrl+S, Reaper just tells me Line 36: invalid escape sequence near '"E:J"'
Does this script not work if my backup folder is located on a external drive or am I doing something else wrong?
|
|
|
07-24-2021, 04:17 PM
|
#92
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@JonLinnarson
You are totally right,
this is was meant to be relative path, not absolute,
I didnt take into account the case of people writing full path;
On todo list then!
|
|
|
07-25-2021, 01:29 AM
|
#93
|
Human being with feelings
Join Date: Jul 2020
Posts: 725
|
Quote:
Originally Posted by X-Raym
@JonLinnarson
You are totally right,
this is was meant to be relative path, not absolute,
I didnt take into account the case of people writing full path;
On todo list then!
|
Ah, okay! So it only works if my backup folder is located in the Reaper default place?
|
|
|
07-25-2021, 03:20 AM
|
#94
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@JonLinnarson
How come your backup folder isn't at the default place ? What setting did you change ? Can you show a screenshot?
(please use reply button instead of quote, for readability)
EDIT: ok I succeed to reproduce, it is because of Automatic backup options at regular interval. Same for coachz incomplete timestamp issue. I'm on it.
Last edited by X-Raym; 07-25-2021 at 03:39 AM.
|
|
|
07-25-2021, 04:27 AM
|
#95
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Ok so v1.0.6, I have change a bit,
you shouldn't need to customize anything in the script, no pattern or backup folder.
Main user variables are:
Code:
limit = 5
do_automatic_backup_dir = true
Where do_automatic_backup_dir also check for the automatic backup path.
See how it works in both project dir and automatic backup dir
The script now support automatically made .rpp-back, which don't have the seconds timecode.
See how it support auomatically named backup in project dir along the one made at save. Beware of windows file ordering though.
PS: the global .rpp backup can be very heavy if you have tons of file... This may perhaps slowdown the script. I woul advice to keep .rpp-back in project folder only.
Not the script doesn't check automatic backup dir if the option is checked in reaper project saving settings.
|
|
|
07-25-2021, 11:16 AM
|
#96
|
Human being with feelings
Join Date: Jul 2020
Posts: 725
|
@X-Raym
I changed my settings so that my project folders didn't end up a huge mess again. I used to have it so that both my reapeaks and backups were saved in the project folder but it ended up with me having maybe 300-1000 different files in each project folder.
I sat for almost a whole day cleaning up in all of my old project folders, deleting the unnecessary backups and rebuilding the peak files on my external drive, and it gave me back over 70gb of my C: drive!
I instead created a "temp" folder on a external drive with three subfolders: Cache, reapeaks and Reaper backups. I don't need to have it on the external drive though, I just placed it there in case it ever grew to the same size again.
With your script though, it wouldn't be a problem so I could move the temp folder back to my C drive if that's the problem!
This is my settings now (don't know how to insert pictures directly):
|
|
|
07-25-2021, 01:41 PM
|
#97
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,458
|
Just to let you know, I have removed my "amagalma_Keep x number of most recent timestamped backups of current project file (deletes older ones - no undo!).lua" script and replaced it with a new script pack that offers everything one could wish.
Check it here.
|
|
|
07-25-2021, 02:04 PM
|
#98
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@JonLinnarson
Can you confirm that the script is now working as expected for you ?
|
|
|
08-09-2021, 04:10 AM
|
#99
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Update
* v1.0.7 (2021-08-09)
+ Save only if project is dirty variable
# Pattern fine tuning for project name with dash and other lua esape characters
|
|
|
08-15-2021, 08:20 AM
|
#100
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,792
|
I'm trying to use the preset script (attached) and set limit to 12 but I only get 5 on run. I followed the directions. Thanks for any ideas.
Last edited by Coachz; 08-15-2023 at 07:04 AM.
|
|
|
08-15-2021, 12:30 PM
|
#101
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@coachz
You have to run the preset file as an action, not the parent script.
|
|
|
08-15-2021, 02:34 PM
|
#102
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,792
|
Quote:
Originally Posted by X-Raym
@coachz
You have to run the preset file as an action, not the parent script.
|
Oh. I guess I missed that instruction. Thank you I'll report back. I only need to include the variables I wish to change in the preset file right?
|
|
|
08-15-2021, 09:43 PM
|
#103
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Coachz
You current file is good. It has both the running code and the desired variable.
Detailed instructions are providen on the gist page.
|
|
|
08-09-2022, 06:56 AM
|
#104
|
Human being with feelings
Join Date: Nov 2010
Posts: 1,746
|
Is there a way to get this script to also keep one file per date like Amalgama's?
|
|
|
08-09-2022, 08:07 AM
|
#105
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@mozart999uk
It could be moded to extend that, but if amagalma's already do that, better use his script instead :P
|
|
|
08-09-2022, 08:30 AM
|
#106
|
Human being with feelings
Join Date: Nov 2010
Posts: 1,746
|
Unfortunately amagalma's doesn't seem to be working properly for a few of us and he / she seems to be off radar at the moment :-(
|
|
|
08-13-2022, 08:31 PM
|
#107
|
Human being with feelings
Join Date: Jan 2008
Location: Vancouver, BC
Posts: 3,795
|
Option to limit # of backup files (overwriting the oldest)
https://forum.cockos.com/showthread.php?t=58511
I requested this over 12 years ago, so long overdue IMO.
I have my backup time set every 2 minutes since I get somewhat frequent crashes and want to minimize loss of work, but especially with project folders on different drives this is a mess to manually remove when unneeded.
__________________
FRs: v5 Media Explorer Requests, Global Quantization, Session View
Win10 Pro 64-bit, Reaper 6(x64), AMD 3950x, Aorus X570 Master, 64GB DDR4 3600, PowerColor Red Devil 5700XT, EVO 970 2TB, 10TB HD, Define R6
|
|
|
09-10-2022, 07:04 AM
|
#108
|
Human being with feelings
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
|
Ok, here are some hard stats to show how the backup system could benefit a little from limiting the number of project backups kept around.
I use a location to keep those backups, via Preferences/Project/Project saving and the option Save to timestamped file in additional directory checked. That path contained the following :
- 14 months of project backup files (07/21 - 09/22)
- 10118 files (I save a lot)
- 153.091.804 kilobytes
How about keeping the last 10 of the same name ? Or however many I'd like ?
And how about a warning message shown after crossing the 1000 file mark right after saving the project once again ? Inspire the user to clean that directory up or have Reaper do that.
I increment the version via the function File/Save new version of project a few times a day. Still I have several dozen backups of the same session in the backup folder.
I know we're catering to the folks who don't want to think about this, but then again that's what most helpful functions tend to do.
Last edited by airon; 09-10-2022 at 07:34 AM.
|
|
|
02-16-2023, 10:43 PM
|
#109
|
Human being with feelings
Join Date: Jul 2014
Posts: 637
|
Back up time
Hi
Is there a way to set a "less than one minute" backup time ?
Thanks
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:00 AM.
|