Hi all, I have had my pi emonbase up and running for nearly a year now and it has run faultlessly :) I will soon need to shut it down as I am planning some mods to its power supply.
I would like to make a full backup of it in case of any issues when restarting it, and I thought rsync would be a good tool to use. I can't find any info on using rsync in this way, so I was curious to know if anybody here has/does it, and can they offer any tips or guidance.
Re: full backup of pi emonbase using rsync
Hello PhilThy, did you see the backup documentation here: https://github.com/emoncms/emoncms/blob/master/docs/Backup.md
Re: full backup of pi emonbase using rsync
Hi Trystan, thanks for the reply. I have read that document but I got the impression that it was aimed at backing up the emoncms installation rather than the entire system. I have other mods, scripts etc running on it and so I was hoping to backup the lot.
Re: full backup of pi emonbase using rsync
What is the operating system on your backup computer?
Paul
Re: full backup of pi emonbase using rsync
Hi Paul, it's Linux (Debian Jessie 64bit)
Phil.T
Re: full backup of pi emonbase using rsync
I use and totally rely upon a system tool called fsarchiver which has worked brilliantly for me.
I have previously used dd, but had all sorts of problems restoring an image file due to it expecting the same physical destination size which is not always the case - especially with SD cards.
fsarchiver works differently in that it only archives actual data, and creates the file system when it extracts the data. Earlier in the year, I tried to update my Rasp Pi to 'Jessie' from 'Wheezy', (and failed twice!) but after each attempt I restored the archive successfully with no loss of data.
I also restored an archive to a replacement HDD again with no problems.
A further benefit is archive size; I archive a 10GB partition which like yours contains lots of other programs, scripts, etc, and yet the archive size is less than 2GB.
Paul
Re: full backup of pi emonbase using rsync
Hi Paul, thanks for the info. I'm running Debian Jessie on my laptop so I'll have a look at that program you suggested.
Re: full backup of pi emonbase using rsync
unfortunatley, fsarchiver doesn't seem to be able to remotely backup a running system. I think rsync is the tool that I want to use, and I have done a trial backup but with errors. I'm guessing that the errors are because these are still running:
Important Make sure you disable oem_gateway/emonhub or raspberrypi_run and any posting to the http api's (stop apache) before copying the data files so that when you make the copy the data is in a state where its not being written to.
I can find the start/stop command for apache on the web but i'm unsure about the other.
Re: full backup of pi emonbase using rsync
Well if you are using emonhub, it's;
$ sudo service emonhub stop
Paul
Re: full backup of pi emonbase using rsync
Thanks Paul. Does it matter which one I start/stop first?
Re: full backup of pi emonbase using rsync
It shouldn't make any difference, although I've always taken the easy route, and archived during 10 minutes of downtime.
Paul
Re: full backup of pi emonbase using rsync
Hi Phil,
I use rsync to make a live backup of my system. Works like a champ. Here's a link to an example of how to implement it. I run it from a cron job that copies all changed files to the backup drive every 30 minutes.
https://wiki.archlinux.org/index.php/full_system_backup_with_rsync
Regards,
Bill
Re: full backup of pi emonbase using rsync
Hi Phil
The comments about backing up the data in useful scripts is referring specifically to the data. As does the references to stopping Apache, Redis and emonhub/oemgateway/raspberrypi. It may make sense to back-up data and file system separately. I usually stop the emoncms server and take a copy of the data, you can actually leave emonhub running and it will buffer the new data whilst you are backing up your data files.
I have also used rsync (although not enough to offer any expertise) and can confirm it can run without stopping services. the filesytem is less dependent on rapidly changing files where as databasing can go horribly wrong if the data changes mid copy.
What errors do you get? do they relate to the data files? if so you can exclude them, which if using
sudo rsync -axv / /target
with a 3rd "data" partition should happen automatically as additionally mounted locations are not included.
Paul
Re: full backup of pi emonbase using rsync
Hi Paul, thanks for your input.
I'm getting a few permission denied errors during copying, unfortunately the info flashes by so quickly that I can't say what files cannot be copied.
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [generator=3.1.1]
This is the info after the backup completes.
I run rsync as follows:
sudo rsync -e ssh -aAXvl --delete --stats --progress --exclude-from '/home/phil/Dropbox/pi_backup/rsync-exclude.txt' pi@<IP_ADDRESS>:/ /home/phil/Dropbox/pi_backup/pi_emoncms/
The excluded directories are:
/tmp/*
/run/*
/proc/*
/sys/*
/dev/*
/mnt/*
/boot/*
/media/*
Phil.T
Re: full backup of pi emonbase using rsync
Try adding something like 2> ~/rsync.log to the command string to redirect just the error messages to a log file, saves sifting them out of pages of progress logs.
Paul
Re: full backup of pi emonbase using rsync
Thanks for the 2> ~/rsync.log tip.
I think I have found the problem, when logging into the pi via ssh I was doing so as user 'pi' who doesn't have full read permissions - hence the permission denied error.
As I had previously enabled root login, it was simple enough to just login as root. For security reasons though, it would be better to add user pi to the sudoers file:
http://www.ustrem.org/en/articles/rsync-over-ssh-as-root-en/
Thanks to all for your help.
Phil.T
Re: full backup of pi emonbase using rsync
thank you very much! i have been trying to use rsync to one-way sync an itunes library from one mac to another machine. is there a way to get more details in to a log file? like date/timestamp? i’ve added >> /path/to/log.txt and it works well. just need to add date/timestamp. also would it be possible to get an email when rsync is done?


@JvmStatic var sharedInstance: Purchases
Singleton instance of Purchases. configure will set this
Return A previously set singleton Purchases instance or null


×
Close
Original Collection
Architecture
City
Sport
Retro
Sky
Typography
Menu
Architecture
Bauhaus Archiv, Berlin photo by Simone Hutsch
Found Typography
Letters and numbers out in the wild
Found Typography
Letters and numbers out in the wild
City Lines
Architects, Engineers and builders...This is for you
City Lines
Architects, Engineers and builders...This is for you
City Lines
Architects, Engineers and builders...This is for you
City Lines
Architects, Engineers and builders...This is for you
Found Typography
Letters and numbers out in the wild
City Lines
Architects, Engineers and builders...This is for you
City Lines
Architects, Engineers and builders...This is for you
City Lines
Architects, Engineers and builders...This is for you
City Lines
Architects, Engineers and builders...This is for you
Found Typography
Letters and numbers out in the wild
City Lines
Architects, Engineers and builders...This is for you
City Lines
Architects, Engineers and builders...This is for you
Architecture
Abu Dhabi Louvre Museum by Alvaro Pinot
Architecture
Architecture photo by Viktor Jakovlev
Architecture
Taller than the Trees by Sean Pollock
Architecture
Den Bell, Antwerpen, Belgium by Brent De Ranter
Architecture
Glass plate facade edge, Madrid, Spain by Joel Filipe
Architecture
British Museum ceiling photo by Mika
Architecture
Evening over Millennium Bridge photo by James Padolsey
Architecture
Architecture, building, geometric and structure HD photo by Frances Gunn
Architecture
Building, sky, grey and blue HD photo by Pierre Châtel-Innocenti


{% extends 'base.html' %} {% load webdesign %} {% block title%}{{block.super}}: About{% endblock %} {% block head %} {% endblock %} {% block content %}
We use a web crawler written in python to gather all avaliable information from Amazon Mechanical Turk, we store that information PostgreSQL and everything is working on Amazon EC2 instances. We crawl Mechanical Turk each hour, and compute daily statistics for new projects and completed tasks once a day.


Insert a tabstop with command + i
Insert a placeholder: select text and press command + j
Insert final cursor position with command + k


Panera bread
Panera is so good. It is such a fantastic gourmet place. I have many soups i enjoy at panera. Such as chicken noodle and brocolli cheddar.
Here are some of my favorite soups
brocolli cheddar
chicken noodle
panera
Panera is a fantastic resturant
party


A set of tools designed to facilitate easy adoption of R for students in introductory classes with little programming experience. Compiles output from existing routines together in an intuitive format, and adds functionality to existing functions. For instance, the regression function can perform linear models, generalized linear models, Cox models, or generalized estimating equations. The user can also specify multiple-partial F-tests to print out with the model coefficients. We also give many routines for descriptive statistics and plotting.
| Version: | 0.0.7 |
| Imports: | Exact, geepack, plyr, survival, sandwich |
| Suggests: | knitr, rmarkdown |
| Published: | 2018-10-10 |
| Author: | Scott S. Emerson [aut], Andrew J. Spieker [aut], Brian D. Williamson [aut], Travis Y. Hee Wai [aut, cre], Solomon Lim [aut], R Core Team [ctb], Terry M Therneu [ctb], Thomas Lumley [ctb] |
| Maintainer: | Travis Y. Hee Wai <theewai at uw.edu> |
| License: | GPL-2 |
| NeedsCompilation: | no |
| CRAN checks: | uwIntroStats results |
| Reference manual: | uwIntroStats.pdf |
| Vignettes: |
Regression in uwIntroStats Using uwIntroStats Multiple-Partial F-tests in Regression |
| Package source: | uwIntroStats_0.0.7.tar.gz |
| Windows binaries: | r-devel: uwIntroStats_0.0.7.zip, r-release: uwIntroStats_0.0.7.zip, r-oldrel: uwIntroStats_0.0.7.zip |
| OS X binaries: | r-release: uwIntroStats_0.0.7.tgz, r-oldrel: uwIntroStats_0.0.7.tgz |
| Old sources: | uwIntroStats archive |
Please use the canonical form https://CRAN.R-project.org/package=uwIntroStats to link to this page.


Hepatic Safety Explorer
Training Example
This is a demo page for the interactive Hepatic Explorer created by the ASA-DIA Interactive Safety Graphics working group. Code, details and documentation are available on
github
.


Select Asset is required field!
Maintenance Type is required field !
Maintenance Description is required field!
Result Code is required field!
Required field*
Required field*
Required field*
Result Description is required field!
Maintenance Start Date is required field!
{{ErrMessageAdd}}
Maintenance End Date is required field!
{{ErrMessageAdd}}


Burnt man found in rice field
by Steve A. GosuicoSTA. ROSA, Nueva Ecija — Police are investigating the death of a man who on Sunday was found burned in a rice field in this municipality.
Town police head Maj. Steven Dela Cruz said the charred body was discovered by Bgy. Rajal Centro Capt. Alex Encarnacion, who immediately reported the gruesome find to the authorities at 7:40 a.m. on the same day.
The corpse was described as about 5’4 in height, 40-45 years old, of medium-built and had a polynesian tattoo on the leg.
Dela Cruz said other evidence at the crime scene, including CCTV footages, were being gathered to help probers in identifying the victim and learning the motive for the killing.


Wall
问题描述 :
Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King’s castle. The King was so greedy, that he would not listen to his Architect’s proposals to build a beautiful brick wall with a perfect shape and nice tall towers. Instead, he ordered to build the wall around the whole castle using the least amount of stone and labor, but demanded that the wall should not come closer to the castle than a certain distance. If the King finds that the Architect has used more resources to build the wall than it was absolutely necessary to satisfy those requirements, then the Architect will loose his head. Moreover, he demanded Architect to introduce at once a plan of the wall listing the exact amount of resources that are needed to build the wall.
Your task is to help poor Architect to save his head, by writing a program that will find the minimum possible length of the wall that he could build around the castle to satisfy King’s requirements.
Your task is to help poor Architect to save his head, by writing a program that will find the minimum possible length of the wall that he could build around the castle to satisfy King’s requirements.
The task is somewhat simplified by the fact, that the King’s castle has a polygonal shape and is situated on a flat ground. The Architect has already established a Cartesian coordinate system and has precisely measured the coordinates of all castle’s vertices in feet.
输入:
The first line of the input file contains two integer numbers N and L separated by a space. N (3 <= N <= 1000) is the number of vertices in the King's castle, and L (1 <= L <= 1000) is the minimal number of feet that King allows for the wall to come close to the castle.
Next N lines describe coordinates of castle’s vertices in a clockwise order. Each line contains two integer numbers Xi and Yi separated by a space (-10000 <= Xi, Yi <= 10000) that represent the coordinates of ith vertex. All vertices are different and the sides of the castle do not intersect anywhere except for vertices.
输出:
Write to the output file the single number that represents the minimal possible length of the wall in feet that could be built around the castle to satisfy King’s requirements. You must present the integer number of feet to the King, because the floating numbers are not invented yet. However, you must round the result in such a way, that it is accurate to 8 inches (1 foot is equal to 12 inches), since the King will not tolerate larger error in the estimates.
样例输入:
9 100 200 400 300 400 300 300 400 300 400 400 500 400 500 200 350 200 200 200
样例输出:
1628
温馨提示:
结果四舍五入就可以了
解题代码:
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { class Point { int x; int y; public Point(int x, int y) { this.x = x; this.y = y; } } public static void main(String[] args) throws IOException { Main main = new Main(); BufferedReader read = new BufferedReader(new InputStreamReader( System.in)); String[] s; s = read.readLine().split(" "); int n = Integer.parseInt(s[0]); int l = Integer.parseInt(s[1]); int x, y; Point[] p = new Point[n]; for (int i = 0; i < n; i++) { s = read.readLine().split(" "); x = Integer.parseInt(s[0]); y = Integer.parseInt(s[1]); p[i] = main.new Point(x, y); } Point[] ch = new Point[n]; int len = 0; if (n >= 3) { len = Graham_scan(p, ch, n); } double sum = 0; for (int i = 0; i < len - 1; i++) { sum += distance(ch[i], ch[i + 1]); } if (len > 1) { sum += distance(ch[len - 1], ch[0]); } sum += 2 * l * Math.PI; System.out.println(Math.round(sum)); } public static double multiply(Point p1, Point p2, Point p0) { return ((p1.x - p0.x) * (p2.y - p0.y) - (p2.x - p0.x) * (p1.y - p0.y)); } public static double distance(Point p1, Point p2) { return (Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y))); } public static int Graham_scan(Point[] PointSet, Point[] ch, int n) { int i, j, k = 0, top = 2; Point tmp; for (i = 1; i < n; i++) if ((PointSet[i].y < PointSet[k].y) || ((PointSet[i].y == PointSet[k].y) && (PointSet[i].x < PointSet[k].x))) k = i; tmp = PointSet[0]; PointSet[0] = PointSet[k]; PointSet[k] = tmp; for (i = 1; i < n - 1; i++) { k = i; for (j = i + 1; j < n; j++) if ((multiply(PointSet[j], PointSet[k], PointSet[0]) > 0) || ((multiply(PointSet[j], PointSet[k], PointSet[0]) == 0) && (distance( PointSet[0], PointSet[j]) < distance( PointSet[0], PointSet[k])))) k = j; tmp = PointSet[i]; PointSet[i] = PointSet[k]; PointSet[k] = tmp; } ch[0] = PointSet[0]; ch[1] = PointSet[1]; ch[2] = PointSet[2]; for (i = 3; i < n; i++) { while (top > 0 && multiply(PointSet[i], ch[top], ch[top - 1]) >= 0) top--; ch[++top] = PointSet[i]; } return top + 1; } }
(adsbygoogle = window.adsbygoogle || []).push({});
第一个数表示数列的个数，5表示之后有5个数
很好的思路，可以借鉴
很好，注释很详细啊
是穷举，但是代码有优化（v数组），并不是2^n。测试数据应该没问题，之前有超时的代码。
其实不需要用LCA，用DFS+vector更简单
正确性是关键，冲突是都会有的，主要是那种算法冲突的概率低
代码过于复杂了吧
这是研发类的题还是算法类？
妈呀！这个Dijkstra模板好长OwQ！
已更正。
真心不错，力顶作者
不太懂呀，乡亲们。原理知道代码不会
很棒的网站，加油！⛽
懂了，谢谢啦


LAST THREE GOOGLE SEARCHES
Shrimp stir fry
Be alright lyrics ariana grande
Cosmic Disclosure
Air max 270
Ovulation pains
Conor Mcgregor
Batman Arkam Asylum Characters
Calories in peanut butter
Does XX chorosome result in
LA weather forecast
Horoscope for aries
ukulele chords to wish you
Nxy soft matte lip cream swatches
Syria Lebanon conflict
aesthetic pics
Square nose ring
gucci blackface
Circle of fifths
23rd March
molly bon apetit
Brooklyn 99 season 6
Autism


DEATH WISH 3 A Film Review Copyright Dragan Antulov 1998
Fact that Charles Bronson represents one of the most important movie icons of the 1980s represents one of the biggest and almost tragic ironies of that decade. Tragedy lies in the fact that the icon status was earned less by quality of his work in movies, but the quantity. Most of those movies were produced by Cannon Group, company led by Israeli producers Menahem Golan and Yoram Globus. Those two men probably thought that they could be the next Roger Corman, B- movie mentors of future Hollywood legends. Unfortunately, that didn't happened, and when Cannon finally went bankrupt at the end of the decade, behind it stood the huge pile of cinematic garbage, that would require at least few centuries before it reaches the camp appeal. Sadly for Bronson, that garbage also contained numerous movies in which that capable character actor and action hero of the 1970s tried to raise their worth simply by being the main lead, and lowering his own reputation in process. On the other hand, Bronson could take comfort in a fact that those movies were extremely popular, especially among the audience 3 or 4 times younger than Bronson himself.
One of such movies that seriously marred Bronson's reputation is DEATH WISH 3, third sequel in the series which began with DEATH WISH in 1974. In the original movie, Bronson played Paul Kersey, mild-mannered New York architect who turns into deadly street vigilante after his family fell victim to urban violence. That movie was far from masterpiece; yet, in it the director Michael Winner was skillfully offering the cinematic remedy for very real disease of growing crime rates of the time (on the same lines like Siegel in DIRTY HARRY). Unfortunately, six years later Cannon Group got rights to the character of Paul Kersey and began destroying it by pumping out sequels; even the presence of its original director didn't stop the rapid decline of the quality. DEATH WISH 3 begins when Kersey comes to visit an old friend, living in the urban wasteland of East New York, populated by young criminals and people too old or too poor to move out. Before the reunion, Kersey's friend falls victim to the street gang led by evil Fraker (played by Gavan O'Herlihy, probably the only noteworthy role in the film). Kersey decides to avenge his death and slowly prepares for his crusade, while the police inspector Shriker (Ed Lauter), ants to use him as a secret weapon in his losing war against the urban crime.
Bronson, the main asset in this movie, plays the character who is nothing more than an efficient killing machine. Although Bronson's charisma does help in overcoming some implausibilities (single man in his 60s and armed with a single pistol manages to wipe out dozens of opponents with superior firepower), the lack of emotions or Bronson's own commitment could be seen in a very few lines spoken in a film. The movie authors were somewhat aware of that emotional shallowness, so they added romantic interest for their hero - public defender played by Deborah Raffin and conveniently terminated in order to give some more motives for Kersey's crusade.  Unfortunately, Michael Winner doesn't know how to work out the plot, and after torturing the viewers with mostly uninteresting characters and cliched and formulaic situations, ends this movie with a bang. The big showdown at the end - that turns East New York into the Sarajevo-like battle zone - is probably the worst part of the movie, because of the poor editing and the cheap sets and props that give away the low budget.
In short, this movie could be recommended only to the most fanatical Charles Bronson fans or for the people who are already desperate for 1980s nostalgia.
(Special note for trekkies: Marina Sirtis, the actress who played Counsellor Deanna Troi in STAR TREK: THE NEXT GENERATION could be spotted in a small role of Portorican wife).
RATING: 3/10 (+)
Review written on July 30th 1998
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews