From b0164d22c9b380a11eb5abc9815af0dacedd0f7a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 29 Aug 2022 14:47:56 +0100 Subject: [PATCH 1/5] Make the maximum posts more realistic --- README_commandline.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_commandline.md b/README_commandline.md index 1c8a75e26..72040271e 100644 --- a/README_commandline.md +++ b/README_commandline.md @@ -233,13 +233,13 @@ python3 epicyon.py --archive [directory] Which will move old posts to the given directory. You can also specify the number of weeks after which images will be archived, and the maximum number of posts within in/outboxes. ``` bash -python3 epicyon.py --archive [directory] --archiveweeks 4 --maxposts 256 +python3 epicyon.py --archive [directory] --archiveweeks 4 --maxposts 32000 ``` If you want old posts to be deleted for data minimization purposes then the archive location can be set to */dev/null*. ``` bash -python3 epicyon.py --archive /dev/null --archiveweeks 4 --maxposts 256 +python3 epicyon.py --archive /dev/null --archiveweeks 4 --maxposts 32000 ``` ## Blocking and unblocking From 68beb3543ca552126c21361d965ba0ba04e2752f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 29 Aug 2022 14:54:37 +0100 Subject: [PATCH 2/5] Example crontab entry --- README_commandline.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README_commandline.md b/README_commandline.md index 72040271e..64f13b4f2 100644 --- a/README_commandline.md +++ b/README_commandline.md @@ -242,6 +242,12 @@ If you want old posts to be deleted for data minimization purposes then the arch python3 epicyon.py --archive /dev/null --archiveweeks 4 --maxposts 32000 ``` +You can put this command into a cron job to ensure that old posts are cleared down regularly. In */etc/crontab* add an entry such as: + +``` bash +*/60 * * * * root cd /opt/epicyon && /usr/bin/python3 epicyon.py --archive /dev/null --archiveweeks 4 --maxposts 32000 +``` + ## Blocking and unblocking Whether you are using the **--federate** option to define a set of allowed instances or not, you may want to block particular accounts even inside of the perimeter. To block an account: From f5a6136da6a4ec29db8c2db0cbe66cadce1c4efa Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 29 Aug 2022 14:58:46 +0100 Subject: [PATCH 3/5] Mention expiring posts --- README_commandline.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README_commandline.md b/README_commandline.md index 64f13b4f2..3128a77b7 100644 --- a/README_commandline.md +++ b/README_commandline.md @@ -222,15 +222,15 @@ python3 epicyon.py --nickname [yournick] --domain [name] \ --undolike [url] --password [c2s password] ``` -## Archiving posts +## Archiving and Expiring posts -You can archive old posts with: +You can archive old posts and expire posts as specified within account profile settings with: ``` bash python3 epicyon.py --archive [directory] ``` -Which will move old posts to the given directory. You can also specify the number of weeks after which images will be archived, and the maximum number of posts within in/outboxes. +Which will move old posts to the given directory and delete any expired posts. You can also specify the number of weeks after which images will be archived, and the maximum number of posts within in/outboxes. ``` bash python3 epicyon.py --archive [directory] --archiveweeks 4 --maxposts 32000 From 209c493306704d13b688811b43deb8dc3e0eea7b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 29 Aug 2022 15:04:50 +0100 Subject: [PATCH 4/5] More explanation --- README_commandline.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README_commandline.md b/README_commandline.md index 3128a77b7..4ce329da9 100644 --- a/README_commandline.md +++ b/README_commandline.md @@ -224,6 +224,8 @@ python3 epicyon.py --nickname [yournick] --domain [name] \ ## Archiving and Expiring posts +As a general rule, all posts will be retained unless otherwise specified. However, on systems with finite and small disk storage running out of space is a show-stopping catastrophe and so clearing down old posts is highly advisable. You can achieve this using the archive commandline option, and optionally also with a cron job. + You can archive old posts and expire posts as specified within account profile settings with: ``` bash From f667c5405006fd835664da890509bb9f7746b107 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 29 Aug 2022 15:18:21 +0100 Subject: [PATCH 5/5] By default don't archive media --- epicyon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epicyon.py b/epicyon.py index a80a62e6c..5a62ccad9 100644 --- a/epicyon.py +++ b/epicyon.py @@ -575,7 +575,7 @@ def _command_options() -> None: default=None, help='Archive old files to the given directory') parser.add_argument('--archiveweeks', dest='archiveWeeks', type=int, - default=4, + default=0, help='Specify the number of weeks after which ' + 'media will be archived') parser.add_argument('--maxposts', dest='archiveMaxPosts', type=int,