I searched quite a bit but can't find a forum post addressing this.
Here is what I did:
1. Obtained the backup utility located here: https://github.com/emoncms/usefulscripts
2. Set the following in backup.php
$link_to_local_emoncms = true; $local_emoncms_location = "/var/www/html/emoncms/"; $local_emoncms_userid = 1; $backup_inputs = false;
3. Added this command to backup.php to limit it to just one feed.
foreach ($feeds as $feed) { if ($feed->id == 85722) {
4. Ran the utility using "php backup.php". Got an error that the phpfiwa directory was not found. Ran it using "sudo php backup.php". The utility ran succesfully and created entries in my /var/lib/phpfiwa directory.
5. Ran "sudo chown -R www-data:root /var/lib/phpfiwa" since root was the owner of the files. The result looks like this:
-rw-r--r-- 1 www-data root 1335176 Mar 9 15:20 85722_0.dat -rw-r--r-- 1 www-data root 133524 Mar 9 15:21 85722_1.dat -rw-r--r-- 1 www-data root 22256 Mar 9 15:21 85722_2.dat -rw-r--r-- 1 www-data root 36 Mar 9 15:20 85722.meta
6. Logged into my local emoncms and looked for the feed. I don't see it.
Any ideas?
Thanks.
Re: Trouble downloading Emoncms.org feed to local Emoncms and seeing it
Can you check your emoncms mysql database to see if it was registered there?
SELECT * FROM feeds;
Might also be worth flushing redis: $ redis-cli "flushall"
Re: Trouble downloading Emoncms.org feed to local Emoncms and seeing it
Running flushall didn't cause the feed to appear in my feed list.
Running the mysql query I got the following result:
The last entry is the feed in question. Looks like the node is 0, and maybe that is the problem? If so, how would I change that?
Thanks!
Re: Trouble downloading Emoncms.org feed to local Emoncms and seeing it
The issue is the userid assigned,
$local_emoncms_userid = 1 should have put it in the right place, so Im not sure why its on 0.
You can manually set the userid with
UPDATE feeds SET userid=1 WHERE id=85722;
then you will need to do a redis-cli "flushall"
Re: Trouble downloading Emoncms.org feed to local Emoncms and seeing it
That worked. Thanks!
I might be able to explain the '0' user ID.
My first attempt at running backup.php I had $local_emoncms_userid = "emoncms", which gave me an error. I corrected the userid and ran it again. Could it have brought in the data the second time but the userid the first time?