auto copy

Konstantinos Togias ktogias at math.upatras.gr
Mon Apr 4 19:57:02 UTC 2011


Τα υλικά της συνταγής είναι τα εξής:

1. mysqldump: Εφαρμογή λήψης αντιγράφου μιας βάσης σε αρχείο κειμένου
(με μορφή εντολών SQL).

2. Bash Scripting: Φτιάχνεις ένα μικρό προγραμματάκι-σενάριο για τον
φλοιό bash το οποίο λαμβάνει το αντίγραφο που θες περνώντας τις
παραμέτρους που χρειάζεται στο mysqldump, κάνοντας κάποιες αντιγραφές
ή μετακινήσεις αρχείων ίσως με cp/mv ή και συμπιέζοντας το αντίγραφο
της βάσης με gzip/bzip2.

3.Crontab: Με αυτό ρυθμίζεις στον cron (server που αναλαμβάνει να
εκτελεί εντολές/προγράμματα/σενάρια σε ορισμένα χρονικά διαστήματα -
π.χ. κάθε 1η του μηνός στις 02:00 - ) να εκτελεί το σενάριο τις
χρονικές στιγμές που θέλεις.

Παραδείγματα εκτέλεσης της συνταγής μπορείς να βρεις στο google:
http://www.google.com/search?q=mysqldump+bash+script

Αναφορές:

man mysqldump
man bash
man crontab

2011/4/4 Alexandros Georgopoulos <alexander_g16 at hotmail.com>:
>
> καλησπέρα φίλοι!! :)
>
> εχω κολησει τώρα, δεν μπορώ να βρω τρόπο (oyte me googling :P ) ωστε να τραβάω και αυτόματο κοπυ μια βασης sql ... :(
>
> καμια ιδέα κάποιος ??
>
> ευχαριστώ καλο βράδυ!! :)
>
>> From: alexander_g16 at hotmail.com
>> To: manos at abiss.gr; ubuntu-gr at lists.ubuntu.com
>> Subject: RE: auto copy
>> Date: Fri, 1 Apr 2011 23:06:25 +0300
>>
>>
>> το βρηκα οκ!!! :)
>>
>> > From: alexander_g16 at hotmail.com
>> > To: manos at abiss.gr; ubuntu-gr at lists.ubuntu.com
>> > Subject: RE: auto copy
>> > Date: Fri, 1 Apr 2011 23:00:57 +0300
>> >
>> >
>> > οκ ευχαριστω, το εκανα εγκατασταση το δουλεψα ολα οκ. αλλα αυτόματα να το κάνει πως γίνετε? μια φορα την μερα για παρδειγμα αυτοματα να κανει sync...
>> >
>> > > Date: Fri, 1 Apr 2011 12:01:00 -0700
>> > > From: manos at abiss.gr
>> > > To: ubuntu-gr at lists.ubuntu.com
>> > > Subject: Re: auto copy
>> > >
>> > > http://www.google.gr/search?sourceid=chrome&ie=UTF-8&q=rsyc+from+one+disk+to+another
>> > >
>> > >
>> > > Quoting Alexandros Georgopoulos <alexander_g16 at hotmail.com>:
>> > >
>> > > >
>> > > > καλησπερα και πάλι!! :)
>> > > >
>> > > > γίνεται να ρυθμισω καπως καποια συγκεκριμενα αρχεια να γινοντε καθε
>> > > > τοσο αυτοματα copy σε εναν αλλο δισκο συνδεμενο στο μηχανημα?
>> > > >
>> > > > ευχαριστώ!! :)
>> > > >
>> > > > -------------- next part --------------
>> > > > An HTML attachment was scrubbed...
>> > > > URL:
>> > > > <https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20110401/0b2c7e5d/attachment.html>
>> > > > --
>> > > > Ubuntu-gr mailing list
>> > > > Ubuntu-gr at lists.ubuntu.com
>> > > >
>> > > > If you do not want to receive any more messages from the ubuntu-gr
>> > > > mailing list, please follow this link and choose unsubscribe:
>> > > > https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
>> > > >
>> > >
>> > >
>> > > --
>> > > Ubuntu-gr mailing list
>> > > Ubuntu-gr at lists.ubuntu.com
>> > >
>> > > If you do not want to receive any more messages from the ubuntu-gr mailing list, please follow this link and choose unsubscribe:
>> > > https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
>> >
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL: <https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20110401/7f5ebf4f/attachment.html>
>> > --
>> > Ubuntu-gr mailing list
>> > Ubuntu-gr at lists.ubuntu.com
>> >
>> > If you do not want to receive any more messages from the ubuntu-gr mailing list, please follow this link and choose unsubscribe:
>> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20110401/e906823c/attachment.html>
>> --
>> Ubuntu-gr mailing list
>> Ubuntu-gr at lists.ubuntu.com
>>
>> If you do not want to receive any more messages from the ubuntu-gr mailing list, please follow this link and choose unsubscribe:
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20110404/6844bb24/attachment.html>
> --
> Ubuntu-gr mailing list
> Ubuntu-gr at lists.ubuntu.com
>
> If you do not want to receive any more messages from the ubuntu-gr mailing list, please follow this link and choose unsubscribe:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
>



-- 
Konstantinos Togias
Dipl.-Math., M.Sc.
Hellenic Open University
and Research Academic Computer Technology Institute

Ubuntu-gr LoCo team member


More information about the Ubuntu-gr mailing list