Backups: storing / space

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Backups: storing / space

Allan Gould
On the subject of backups, I make regular gramps backups (usually at
least once at the end of the session and also sometimes during a long
session).  In consequence, the Gramps backups folder fills up. Is there
any way of only keeping a certain number of backup files or days' backup
(similar to e.g. some e-mail or newsgroup readers retention policy).  I
don't mind deleting past backups manually (others may not be so happy
digging around the filestore), but maybe something could be added to the
backup routine which says "delete the last n (days) backups" or "keep
the last n (days) backups".
Just my 2 (pence/cents) worth....

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backups: storing / space

Ron Johnson
On 07/04/2017 05:16 AM, Allan Gould wrote:

> On the subject of backups, I make regular gramps backups (usually at least
> once at the end of the session and also sometimes during a long session).  
> In consequence, the Gramps backups folder fills up. Is there any way of
> only keeping a certain number of backup files or days' backup (similar to
> e.g. some e-mail or newsgroup readers retention policy).  I don't mind
> deleting past backups manually (others may not be so happy digging around
> the filestore), but maybe something could be added to the backup routine
> which says "delete the last n (days) backups" or "keep the last n (days)
> backups".
> Just my 2 (pence/cents) worth....

Call me Grumpy Old Computer Guy, but that's a task for the OS.  For Linux,
add a crontab entry which looks like this to delete files older than 5 days:

find /path/to/files* -mtime +5 -exec rm {} \;

(I don't know how you'd do it in Windows.)

--
World Peace Through Nuclear Pacification


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backups: storing / space

Serge Noiraud-2
Hi,

forgot the list.
Le 04/07/2017 à 15:56, Ron Johnson a écrit :
> On 07/04/2017 05:16 AM, Allan Gould wrote:
>> On the subject of backups, I make regular gramps backups (usually at least once at the end of the session and also sometimes during a long session).  In consequence, the Gramps backups folder fills up. Is there any way of only keeping a certain number of backup files or days' backup (similar to e.g. some e-mail or newsgroup readers retention policy).  I don't mind deleting past backups manually (others may not be so happy digging around the filestore), but maybe something could be added to the backup routine which says "delete the last n (days) backups" or "keep the last n (days) backups".
>> Just my 2 (pence/cents) worth....
>
> Call me Grumpy Old Computer Guy, but that's a task for the OS. For Linux, add a crontab entry which looks like this to delete files older than 5 days:
>
> find /path/to/files* -mtime +5 -exec rm {} \;
Yes, I agree with that, but if you do nothing during 10 days, you have no more backups.

>
> (I don't know how you'd do it in Windows.)
>
I think the best way should be the following :

create a script :


#!/bin/bash

cd /path/to/you/directory

NB=10 # number of files to keep.

ls -1tr ./My_File_Name* | head -n -$NB | xargs rm -rf


You can run this script from cron.


Serge


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backups: storing / space

Dave Hamilton
I have created a script that runs each day using Windows scheduler.

This runs the xcopy command to back up both the Gramps database files and my genealogy folders to a folder on an external drive named after the day the script runs. Xcopy does a replace on the target only if the source has changed. Script is as follows:

echo off

REM Get the day of the week

set day=%DATE:~0,3%

IF %day% == Mon set dayofweek=Monday
IF %day% == Tue set dayofweek=Tuesday
IF %day% == Wed set dayofweek=Wednesday
IF %day% == Thu set dayofweek=Thursday
IF %day% == Fri set dayofweek=Friday
IF %day% == Sat set dayofweek=Saturday
IF %day% == Sun set dayofweek=Sunday

echo %dayofweek%

REM If a folder doesn't exist on h: for the day of the week, create an empty folder

if not exist "h:\%dayofweek%\" mkdir "h:\%dayofweek%\"

echo Genealogy
xcopy "C:\Genealogy\*.*" h:\%dayofweek%\Genealogy\ /c /s /r /d /y /i > h:\%dayofweek%\xcopy.log
echo Gramps Data
xcopy "C:\Users\Dave\Appdata\Roaming\Gramps\Grampsdb\*.*" h:\%dayofweek%\Grampsdb\ /c /s /r /d /y /i >> h:\ %dayofweek%\xcopy.log

pause

Cheers
Dave
-----Original Message-----
From: Serge Noiraud [mailto:[hidden email]]
Sent: Wednesday, 5 July 2017 2:50 AM
To: [hidden email]
Subject: Re: [Gramps-users] Backups: storing / space

Hi,

forgot the list.
Le 04/07/2017 à 15:56, Ron Johnson a écrit :
> On 07/04/2017 05:16 AM, Allan Gould wrote:
>> On the subject of backups, I make regular gramps backups (usually at least once at the end of the session and also sometimes during a long session).  In consequence, the Gramps backups folder fills up. Is there any way of only keeping a certain number of backup files or days' backup (similar to e.g. some e-mail or newsgroup readers retention policy).  I don't mind deleting past backups manually (others may not be so happy digging around the filestore), but maybe something could be added to the backup routine which says "delete the last n (days) backups" or "keep the last n (days) backups".
>> Just my 2 (pence/cents) worth....
>
> Call me Grumpy Old Computer Guy, but that's a task for the OS. For Linux, add a crontab entry which looks like this to delete files older than 5 days:
>
> find /path/to/files* -mtime +5 -exec rm {} \;
Yes, I agree with that, but if you do nothing during 10 days, you have no more backups.

>
> (I don't know how you'd do it in Windows.)
>
I think the best way should be the following :

create a script :


#!/bin/bash

cd /path/to/you/directory

NB=10 # number of files to keep.

ls -1tr ./My_File_Name* | head -n -$NB | xargs rm -rf


You can run this script from cron.


Serge


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backups: storing / space

Ron Johnson
In reply to this post by Serge Noiraud-2
On 07/04/2017 06:36 PM, Dave Hamilton wrote:
> I have created a script that runs each day using Windows scheduler.
>
> This runs the xcopy command to back up both the Gramps database files and my genealogy folders to a folder on an external drive named after the day the script runs. Xcopy does a replace on the target only if the source has changed.
[snip]
> xcopy "C:\Users\Dave\Appdata\Roaming\Gramps\Grampsdb\*.*" h:\%dayofweek%\Grampsdb\ /c /s /r /d /y /i >> h:\ %dayofweek%\xcopy.log

Bad idea because the database engine that Gramps (currently) uses is very
sensitive to version numbers (even minor ones).  Do an export (it works in
Linux; don't know about Windows) from the Scheduler.

--
World Peace Through Nuclear Pacification


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backups: storing / space

Gil da Costa
On 05/07/2017 02:32, Ron Johnson wrote:

> On 07/04/2017 06:36 PM, Dave Hamilton wrote:
>> I have created a script that runs each day using Windows scheduler.
>>
>> This runs the xcopy command to back up both the Gramps database files
>> and my genealogy folders to a folder on an external drive named after
>> the day the script runs. Xcopy does a replace on the target only if
>> the source has changed.
> [snip]
>> xcopy "C:\Users\Dave\Appdata\Roaming\Gramps\Grampsdb\*.*"
>> h:\%dayofweek%\Grampsdb\ /c /s /r /d /y /i >> h:\ %dayofweek%\xcopy.log
>
> Bad idea because the database engine that Gramps (currently) uses is
> very sensitive to version numbers (even minor ones).  Do an export (it
> works in Linux; don't know about Windows) from the Scheduler.
>
Furthermore, copying database files while Gramps maybe running can
result in an inconsistent backup. No problem with XML backup.


G.Da Costa


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Printing or exporting list of references

Allan Gould
In reply to this post by Allan Gould
It's possible to view the references for e.g. a citation or a note (i.e.
those e.g. events that use the citation).
Is it possible to either print or preferably export the list of
references on a citation or a note.

I want to compare the list of references in one citation to the
references on another citation.  I could screen dump (but it's more than
one screenful), and it doesn't seem possible to copy/paste the list.
Doing it on screen/longhand would be quite laborious and/or error prone.

Windows 10 / GrampsAIO64-4.2.3-1

TIA
Allan



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Loading...