Opml backup automation

Hi all,

I am new to tt-rss and looking for a method to automate my OPML backup export.

I have checked the API documentation and not found this. I have also checked existing plugins…

If nothing exist, i am looking for using directly backend.php with a curl call, but i didn’t manage to do this properly… Is there a better way to do this ?

Thanks in advance.

I simply created a public OPML URL and run this as a cron task:

curl "<a public OPML URL>" | gzip > backup_$(date +%y%m%d).gz

Hi,

Thanks for your answer.
But is there any method to do this without create a PUBLIC link ?

Thanks.

Has anything changed since 2017 in this respect?

I would be happy if backing up the opml worked without a public link too.

try update.php --help

Great, that’s what I wanted, thanks.

Sorry to raise this up again, but how do I “unpublish” the public opml link once generated? I have found the button to re-generate it, but not remove this link entirely.

other than through the database, you can’t currently. i’ll make a note to add a delete button there later.

since you can just change the url to something random again and it’s not like anyone could ever guess, it doesn’t seem like an immediate problem

e: does ANYONE actually use this published opml thing? unless someone pipes up (with a good reason included), i’m thinking of removing it altogether. CLI export should be enough for any kind of automation.

this went just as i expected

https://git.tt-rss.org/fox/tt-rss/commit/44b274b6d422fd647bcffade2afba6a7e62f2786

Would it be possible to add a parameter that could allow to append a timestamp to the filename?
Would be great for opml export, articles and starred articles, in order to created a periodic backup via cron.

Thanks in advance.

Regards

If you’re doing this from a cron script you can just generate the date with the date command and use that in the file name.

php update.php --opml-export admin:$(date +%Y%m%d)-admin-opml-backup.xml

Thanks for this, and also editing the code :smiley:

After some tests, I tweaked it a little bit.
Since I am planning on running it once a day, I removed the time and left just the data. I also created a backup directory. Below what I come up with, in case it might be helpful for others:

php update.php --opml-export admin:/full/path/to/directorybackup/`date +\%Y_\%m_\%d`-admin-opml-backup.xml --quiet >/dev/null 2>&1
php update.php --data_user admin --data_only_marked --data_export /full/path/to/directorybackup/`date +\%Y_\%m_\%d`-admin-starred.zip --quiet >/dev/null 2>&1
php update.php --data_user admin --data_export /full/path/to/directorybackup/`date +\%Y_\%m_\%d`-admin-full.zip --quiet >/dev/null 2>&1

Wouldn’t it just be easier to do a database dump everyday?

My hosting provider already provides me with a daily backup of the database.
I am not very good at working with dumps, so having feeds and articles ready in a small file is more convenient for me.
I might realize that it is not worth the disk space and dismiss the whole thing in the future.