dverleysen
Posts: 34
Joined: Wed Jan 06, 2016 2:00 pm

Backup a Raspberry over the network

Fri Jun 10, 2016 11:11 am

Hey,

i'm searching a tool or a kind of code to backup my Raspberry every night to my Synology. A 'dump' should be perfect but I don't know if this is possible over the network with a working Raspberry.

Some one has any experience in making a dump over the network?
Let me know :)

Thanks!
https://www.linkedin.com/pulse/harvesting-tomatoes-version-20-didier-verleysen/

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Backup a Raspberry over the network

Fri Jun 10, 2016 11:43 am

sudo rsync -vax / user@remote.location:/path/to/data
sudo rsync -vax /boot/ user@remote.location:/path/to/data/boot
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

dverleysen
Posts: 34
Joined: Wed Jan 06, 2016 2:00 pm

Re: Backup a Raspberry over the network

Tue Jun 14, 2016 4:50 pm

@RaTTus
I don't think my MySQL database will be copied with that command, not sure...?
Is there a tool or command to backup everything, like a kind of 'dump' that I can take.

Why: In case of a crash of the raspberry, I can recover everything easly...
https://www.linkedin.com/pulse/harvesting-tomatoes-version-20-didier-verleysen/

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Backup a Raspberry over the network

Tue Jun 14, 2016 6:22 pm

dverleysen wrote:@RaTTus
I don't think my MySQL database will be copied with that command, not sure...?
Is there a tool or command to backup everything, like a kind of 'dump' that I can take.
Why not? MySQL databases are a just a bunch of files in /var/lib/mysql (nothing special). You should probably close mysqld while you run the rsync.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Backup a Raspberry over the network

Tue Jun 14, 2016 8:06 pm

dverleysen wrote:@RaTTus
I don't think my MySQL database will be copied with that command, not sure...?
Is there a tool or command to backup everything, like a kind of 'dump' that I can take.

Why: In case of a crash of the raspberry, I can recover everything easly...

Code: Select all

 mysqldump -u <uname> -p <pword> --all-databases > alldb_backup.sql 

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Backup a Raspberry over the network

Wed Jun 15, 2016 6:48 am

you never mentioned anything about MySQL in your first post...
see the one above
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

dverleysen
Posts: 34
Joined: Wed Jan 06, 2016 2:00 pm

Re: Backup a Raspberry over the network

Wed Jun 15, 2016 7:03 am

RaTTuS wrote:you never mentioned anything about MySQL in your first post...
see the one above
True, sorry for that ;) // @RaTTuS
https://www.linkedin.com/pulse/harvesting-tomatoes-version-20-didier-verleysen/

Return to “Networking and servers”