Verita84 3 months ago
commit
42ba397150
  1. 339
      LICENSE
  2. 67
      README.md
  3. 5
      src/mephisto/.svn/all-wcprops
  4. 34
      src/mephisto/.svn/entries
  5. 143
      src/mephisto/gui/.svn/all-wcprops
  6. 810
      src/mephisto/gui/.svn/entries
  7. 947
      src/mephisto/gui/.svn/text-base/Backup.java.svn-base
  8. 51
      src/mephisto/gui/.svn/text-base/Burner.java.svn-base
  9. 45
      src/mephisto/gui/.svn/text-base/Checker.java.svn-base
  10. 83
      src/mephisto/gui/.svn/text-base/Config.java.svn-base
  11. 139
      src/mephisto/gui/.svn/text-base/Cron.java.svn-base
  12. 1215
      src/mephisto/gui/.svn/text-base/LiveCD.java.svn-base
  13. 116
      src/mephisto/gui/.svn/text-base/Menu.java.svn-base
  14. 249
      src/mephisto/gui/.svn/text-base/MephUtil.java.svn-base
  15. 18
      src/mephisto/gui/.svn/text-base/MephistoCD.java.svn-base
  16. 158
      src/mephisto/gui/.svn/text-base/Package.java.svn-base
  17. 363
      src/mephisto/gui/.svn/text-base/Part.java.svn-base
  18. 34
      src/mephisto/gui/.svn/text-base/RootCheck.java.svn-base
  19. 18
      src/mephisto/gui/.svn/text-base/RsyncCheck.java.svn-base
  20. 789
      src/mephisto/gui/.svn/text-base/Settings.java.svn-base
  21. 303
      src/mephisto/gui/.svn/text-base/lvm.java.svn-base
  22. 152
      src/mephisto/gui/.svn/text-base/makecd.java.svn-base
  23. 314
      src/mephisto/gui/.svn/text-base/meph.form.svn-base
  24. 417
      src/mephisto/gui/.svn/text-base/meph.java.svn-base
  25. 243
      src/mephisto/gui/.svn/text-base/plugins.java.svn-base
  26. 869
      src/mephisto/gui/.svn/text-base/restore.java.svn-base
  27. 305
      src/mephisto/gui/.svn/text-base/swraid.java.svn-base
  28. 30
      src/mephisto/gui/.svn/text-base/tarsize.java.svn-base
  29. 47
      src/mephisto/gui/.svn/text-base/threadedcommand.java.svn-base
  30. 947
      src/mephisto/gui/Backup.java
  31. 51
      src/mephisto/gui/Burner.java
  32. 45
      src/mephisto/gui/Checker.java
  33. 83
      src/mephisto/gui/Config.java
  34. 139
      src/mephisto/gui/Cron.java
  35. 1215
      src/mephisto/gui/LiveCD.java
  36. 116
      src/mephisto/gui/Menu.java
  37. 249
      src/mephisto/gui/MephUtil.java
  38. 18
      src/mephisto/gui/MephistoCD.java
  39. 158
      src/mephisto/gui/Package.java
  40. 363
      src/mephisto/gui/Part.java
  41. 34
      src/mephisto/gui/RootCheck.java
  42. 18
      src/mephisto/gui/RsyncCheck.java
  43. 789
      src/mephisto/gui/Settings.java
  44. 303
      src/mephisto/gui/lvm.java
  45. 152
      src/mephisto/gui/makecd.java
  46. 314
      src/mephisto/gui/meph.form
  47. 417
      src/mephisto/gui/meph.java
  48. 243
      src/mephisto/gui/plugins.java
  49. 869
      src/mephisto/gui/restore.java
  50. 305
      src/mephisto/gui/swraid.java
  51. 30
      src/mephisto/gui/tarsize.java
  52. 47
      src/mephisto/gui/threadedcommand.java
  53. 131
      src/mephisto/mephisto/.svn/all-wcprops
  54. 742
      src/mephisto/mephisto/.svn/entries
  55. 5
      src/mephisto/mephisto/.svn/prop-base/Backup.java.svn-base
  56. 5
      src/mephisto/mephisto/.svn/prop-base/Checker.java.svn-base
  57. 5
      src/mephisto/mephisto/.svn/prop-base/Config.java.svn-base
  58. 5
      src/mephisto/mephisto/.svn/prop-base/Cron.java.svn-base
  59. 5
      src/mephisto/mephisto/.svn/prop-base/LiveCD.java.svn-base
  60. 5
      src/mephisto/mephisto/.svn/prop-base/Main.java.svn-base
  61. 5
      src/mephisto/mephisto/.svn/prop-base/Menu.java.svn-base
  62. 5
      src/mephisto/mephisto/.svn/prop-base/MephistoCD.java.svn-base
  63. 5
      src/mephisto/mephisto/.svn/prop-base/RootCheck.java.svn-base
  64. 5
      src/mephisto/mephisto/.svn/prop-base/RsyncCheck.java.svn-base
  65. 5
      src/mephisto/mephisto/.svn/prop-base/Sync.java.svn-base
  66. 5
      src/mephisto/mephisto/.svn/prop-base/plugins.java.svn-base
  67. 5
      src/mephisto/mephisto/.svn/prop-base/restore.java.svn-base
  68. 5
      src/mephisto/mephisto/.svn/prop-base/tarsize.java.svn-base
  69. 1052
      src/mephisto/mephisto/.svn/text-base/Backup.java.svn-base
  70. 45
      src/mephisto/mephisto/.svn/text-base/Checker.java.svn-base
  71. 84
      src/mephisto/mephisto/.svn/text-base/Config.java.svn-base
  72. 147
      src/mephisto/mephisto/.svn/text-base/Cron.java.svn-base
  73. 1357
      src/mephisto/mephisto/.svn/text-base/LiveCD.java.svn-base
  74. 108
      src/mephisto/mephisto/.svn/text-base/Main.java.svn-base
  75. 139
      src/mephisto/mephisto/.svn/text-base/Menu.java.svn-base
  76. 282
      src/mephisto/mephisto/.svn/text-base/MephUtil.java.svn-base
  77. 20
      src/mephisto/mephisto/.svn/text-base/MephistoCD.java.svn-base
  78. 156
      src/mephisto/mephisto/.svn/text-base/Package.java.svn-base
  79. 446
      src/mephisto/mephisto/.svn/text-base/Part.java.svn-base
  80. 34
      src/mephisto/mephisto/.svn/text-base/RootCheck.java.svn-base
  81. 22
      src/mephisto/mephisto/.svn/text-base/RsyncCheck.java.svn-base
  82. 1050
      src/mephisto/mephisto/.svn/text-base/Settings.java.svn-base
  83. 31
      src/mephisto/mephisto/.svn/text-base/Sync.java.svn-base
  84. 361
      src/mephisto/mephisto/.svn/text-base/lvm.java.svn-base
  85. 158
      src/mephisto/mephisto/.svn/text-base/makecd.java.svn-base
  86. 248
      src/mephisto/mephisto/.svn/text-base/plugins.java.svn-base
  87. 890
      src/mephisto/mephisto/.svn/text-base/restore.java.svn-base
  88. 356
      src/mephisto/mephisto/.svn/text-base/swraid.java.svn-base
  89. 30
      src/mephisto/mephisto/.svn/text-base/tarsize.java.svn-base
  90. 1052
      src/mephisto/mephisto/Backup.java
  91. 45
      src/mephisto/mephisto/Checker.java
  92. 84
      src/mephisto/mephisto/Config.java
  93. 147
      src/mephisto/mephisto/Cron.java
  94. 1357
      src/mephisto/mephisto/LiveCD.java
  95. 108
      src/mephisto/mephisto/Main.java
  96. 139
      src/mephisto/mephisto/Menu.java
  97. 282
      src/mephisto/mephisto/MephUtil.java
  98. 20
      src/mephisto/mephisto/MephistoCD.java
  99. 156
      src/mephisto/mephisto/Package.java
  100. 446
      src/mephisto/mephisto/Part.java

339
LICENSE

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

67
README.md

@ -0,0 +1,67 @@
What is Mephisto Backup?
This program can do simple backups and syncs over a network or locally. Mephisto Backup was made with the Java programming language. The key feature of this program is the ability to backup your system to an image and copy it to a Linux Live DVD for future restoration. The user can then take that cd and move his or her system to any PC.
Youtube Videos
Demos:
http://www.youtube.com/watch?v=Xwr1cw-nUFs
http://www.youtube.com/watch?v=0PycaVQ3YzE
How to compile from source:
http://www.youtube.com/watch?v=PWlQySF-xd4
Slideshow
http://mephistobackup.googlecode.com/files/mephistobackup-public.ppt
Features
Backup your operating system to a Live CD.
Restore your OS from the official live CD which is used by Mephisto Backup to Restore your operating system only.
Displays the size of your backup ISO and TAR file after each backup job is ran.
Blank DVD-RW’s.
Sync between locations and save backup configurations.
Burn the backup image to the live cd within the program.
Backup Schedules.
Built-in partitioning tool.
Built-in Software RAID configuration tool.
Graphical user interface.
NEWS
7/13/2013
New Mephisto release: v1.16 !
Contains many bug fixes. Please see "Downloads" for detailed information.
Why the re-imaging section of the program may not work for you
Your using a different filesystem than ext2, btrfs, ext3, ext4, or xfs.
Your not using Arch Linux, Fedora, Debian, Ubuntu or basically an operating system that uses something else besides mkinitcpio, mkinitrd, or mkinitramfs to generate a kernel initrd image.
About the Live CD
The Live CD is a modified Gentoo minimal install disc. When the disc is finished booting, the Mephisto Backup restore process will begin automatically.
The MephistoBackup? Restore Live CD does not automatically load Mephisto Backup.
Simply type :
mkdir /cdrom
mount /dev/cdrom /cdrom
cd /mnt/cdrom && ./mephisto
Restore disc downloads: http://code.google.com/p/mephistobackup/wiki/mephistocd
RELEASES
1.16.x is the long term support release.
A long term support release receives patches and stability improvements.
Feel free to test and submit bug reports to phillip.tribble@gmail.com.
Click "Downloads" on the top to download.
http://code.google.com/p/mephistobackup/downloads/list
How to run: unzip, cd into the folder, ./mephistobackup or ./mephistobackupgui
Restore disc downloads: http://code.google.com/p/mephistobackup/wiki/mephistocd
Tutorials:
http://code.google.com/p/mephistobackup/wiki/tutorials

5
src/mephisto/.svn/all-wcprops

@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 33
/svn/!svn/ver/2852/trunk/mephisto
END

34
src/mephisto/.svn/entries

@ -0,0 +1,34 @@
10
dir
2870
http://mephistobackup.googlecode.com/svn/trunk/mephisto
http://mephistobackup.googlecode.com/svn
2013-07-18T20:39:01.416897Z
2852
phillip.tribble@gmail.com
e32d967c-a327-11dd-9dc9-65bc890fb60a
gui
dir
mephisto
dir

143
src/mephisto/gui/.svn/all-wcprops

@ -0,0 +1,143 @@
K 25
svn:wc:ra_dav:version-url
V 37
/svn/!svn/ver/2851/trunk/mephisto/gui
END
MephistoCD.java
K 25
svn:wc:ra_dav:version-url
V 53
/svn/!svn/ver/2159/trunk/mephisto/gui/MephistoCD.java
END
Settings.java
K 25
svn:wc:ra_dav:version-url
V 51
/svn/!svn/ver/2845/trunk/mephisto/gui/Settings.java
END
Cron.java
K 25
svn:wc:ra_dav:version-url
V 47
/svn/!svn/ver/2734/trunk/mephisto/gui/Cron.java
END
Menu.java
K 25
svn:wc:ra_dav:version-url
V 47
/svn/!svn/ver/2734/trunk/mephisto/gui/Menu.java
END
Checker.java
K 25
svn:wc:ra_dav:version-url
V 50
/svn/!svn/ver/2159/trunk/mephisto/gui/Checker.java
END
Backup.java
K 25
svn:wc:ra_dav:version-url
V 49
/svn/!svn/ver/2735/trunk/mephisto/gui/Backup.java
END
Config.java
K 25
svn:wc:ra_dav:version-url
V 49
/svn/!svn/ver/2159/trunk/mephisto/gui/Config.java
END
LiveCD.java
K 25
svn:wc:ra_dav:version-url
V 49
/svn/!svn/ver/2851/trunk/mephisto/gui/LiveCD.java
END
Part.java
K 25
svn:wc:ra_dav:version-url
V 47
/svn/!svn/ver/2734/trunk/mephisto/gui/Part.java
END
meph.form
K 25
svn:wc:ra_dav:version-url
V 47
/svn/!svn/ver/2735/trunk/mephisto/gui/meph.form
END
threadedcommand.java
K 25
svn:wc:ra_dav:version-url
V 58
/svn/!svn/ver/2159/trunk/mephisto/gui/threadedcommand.java
END
plugins.java
K 25
svn:wc:ra_dav:version-url
V 50
/svn/!svn/ver/2721/trunk/mephisto/gui/plugins.java
END
tarsize.java
K 25
svn:wc:ra_dav:version-url
V 50
/svn/!svn/ver/2159/trunk/mephisto/gui/tarsize.java
END
RootCheck.java
K 25
svn:wc:ra_dav:version-url
V 52
/svn/!svn/ver/2159/trunk/mephisto/gui/RootCheck.java
END
restore.java
K 25
svn:wc:ra_dav:version-url
V 50
/svn/!svn/ver/2850/trunk/mephisto/gui/restore.java
END
makecd.java
K 25
svn:wc:ra_dav:version-url
V 49
/svn/!svn/ver/2734/trunk/mephisto/gui/makecd.java
END
MephUtil.java
K 25
svn:wc:ra_dav:version-url
V 51
/svn/!svn/ver/2845/trunk/mephisto/gui/MephUtil.java
END
swraid.java
K 25
svn:wc:ra_dav:version-url
V 49
/svn/!svn/ver/2734/trunk/mephisto/gui/swraid.java
END
meph.java
K 25
svn:wc:ra_dav:version-url
V 47
/svn/!svn/ver/2735/trunk/mephisto/gui/meph.java
END
Package.java
K 25
svn:wc:ra_dav:version-url
V 50
/svn/!svn/ver/2734/trunk/mephisto/gui/Package.java
END
RsyncCheck.java
K 25
svn:wc:ra_dav:version-url
V 53
/svn/!svn/ver/2734/trunk/mephisto/gui/RsyncCheck.java
END
Burner.java
K 25
svn:wc:ra_dav:version-url
V 49
/svn/!svn/ver/2734/trunk/mephisto/gui/Burner.java
END
lvm.java
K 25
svn:wc:ra_dav:version-url
V 46
/svn/!svn/ver/2734/trunk/mephisto/gui/lvm.java
END

810
src/mephisto/gui/.svn/entries

@ -0,0 +1,810 @@
10
dir
2870
http://mephistobackup.googlecode.com/svn/trunk/mephisto/gui
http://mephistobackup.googlecode.com/svn
2013-07-18T19:53:59.024174Z
2851
phillip.tribble@gmail.com
e32d967c-a327-11dd-9dc9-65bc890fb60a
MephistoCD.java
file
2013-11-22T23:12:55.646841Z
17f74c819eaa172da2cdb051ebb525f9
2010-09-07T13:12:27.454617Z
2159
phillip.tribble
449
Settings.java
file
2013-11-22T23:12:55.646841Z
0f0d6d58b68ae9779a29b05f963ad9d5
2013-07-18T05:34:01.021184Z
2845
phillip.tribble@gmail.com
19321
Cron.java
file
2013-11-22T23:12:55.647841Z
4083241fe28cf82a19134f57d7ad0c96
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
5332
Menu.java
file
2013-11-22T23:12:55.647841Z
7441709e310a498123ed3733f75569e9
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
5302
Checker.java
file
2013-11-22T23:12:55.647841Z
75efdad8ed174e157684205e1dc8cfa6
2010-09-07T13:12:27.454617Z
2159
phillip.tribble
1335
Backup.java
file
2013-11-22T23:12:55.647841Z
c5993794988f775cbdd2da7c74003cbf
2012-07-30T20:22:09.460134Z
2735
phillip.tribble@gmail.com
38464
Config.java
file
2013-11-22T23:12:55.647841Z
c22ca2fb0acedb1e47f267d038704347
2010-09-07T13:12:27.454617Z
2159
phillip.tribble
2406
LiveCD.java
file
2013-11-22T23:12:55.647841Z
a402e4d3e0903b0b899d180d0211d994
2013-07-18T19:53:59.024174Z
2851
phillip.tribble@gmail.com
48419
Part.java
file
2013-11-22T23:12:55.647841Z
afc0a71a47b9b21d1771d0a71aec51ba
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
13139
meph.form
file
2013-11-22T23:12:55.648841Z
110b9b14f643a9336942664e8183f8dd
2012-07-30T20:22:09.460134Z
2735
phillip.tribble@gmail.com
15762
threadedcommand.java
file
2013-11-22T23:12:55.648841Z
a23fb565575083577bf1076cb7c34e8f
2010-09-07T13:12:27.454617Z
2159
phillip.tribble
1297
plugins.java
file
2013-11-22T23:12:55.648841Z
65b83491de565c55c8075c1f4660b7a1
2012-07-27T21:37:17.218470Z
2721
phillip.tribble@gmail.com
8496
tarsize.java
file
2013-11-22T23:12:55.648841Z
240bf8aec83aa1d643404e2d19117987
2010-09-07T13:12:27.454617Z
2159
phillip.tribble
697
RootCheck.java
file
2013-11-22T23:12:55.648841Z
190257fff968d32adcd3284b4ce6575b
2010-09-07T13:12:27.454617Z
2159
phillip.tribble
750
restore.java
file
2013-11-22T23:12:55.648841Z
3da2f014fdb8644890631c06a17017e5
2013-07-18T18:36:15.472759Z
2850
phillip.tribble@gmail.com
34470
makecd.java
file
2013-11-22T23:12:55.648841Z
bbfdd92a95314f0882b998486b2e7458
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
5800
MephUtil.java
file
2013-11-22T23:12:55.648841Z
a61d543d1f0c04b229114903fd625faf
2013-07-18T05:34:01.021184Z
2845
phillip.tribble@gmail.com
8183
swraid.java
file
2013-11-22T23:12:55.649841Z
5575a7a20d0b9915b488e4179b035b20
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
11709
meph.java
file
2013-11-22T23:12:55.649841Z
4c41c04f876d16baea6b53fad4a052fd
2012-07-30T20:22:09.460134Z
2735
phillip.tribble@gmail.com
16692
Package.java
file
2013-11-22T23:12:55.649841Z
c907102adc64f95bab62c45bbde90831
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
6594
RsyncCheck.java
file
2013-11-22T23:12:55.649841Z
16a49b27d8dc2e23b6356d615f6f6786
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
335
Burner.java
file
2013-11-22T23:12:55.649841Z
0af3eaa80cf2809913d4a5ed942e5643
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
2111
lvm.java
file
2013-11-22T23:12:55.649841Z
7e75c963a83923561caee7c16f46835b
2012-07-30T20:06:09.008085Z
2734
phillip.tribble@gmail.com
10639

947
src/mephisto/gui/.svn/text-base/Backup.java.svn-base

@ -0,0 +1,947 @@
package gui;
import java.io.*;
import java.util.*;
class Backup implements Runnable {
meph meph;
private static String loadcreate = null;
private static String editorrun = null;
private static int linecounter = 0;
private static String changechoice = null;
private static String therest = null;
private static String new1 = null;
private static String s = null;
private static String scan = null;
private static String backuplocation = null;
private static String find_excluded_directory = null;
private static String finalpart = null;
private static String newstring = null;
private static String cchoice1 = null;
private static String restorelocation = null;
private static String originalinput = null;
private static String EXCLUDE_STATEMENT = "--exclude=";
public static String homebackupname = null;
public static String homebackuplocation = null;
public static String[] listconfigmenu = new String[100];
// public String Name;
//Boolean statements for the Thread. Creating a thread prevents the GUI from locking up.
public static String Finalpart;
public static boolean systembackup = false;
public static boolean hbackup = false;
public static boolean network = false;
public static boolean foldersync = false;
static String message;
public static void setFinalpart(String data) {
Finalpart = data;
}
public static void setMessage(String data) {
message = data;
}
public static String getMessage() {
return message;
}
public static boolean interupt = true;
public static String getFinalpart() {
return Finalpart;
}
public void run() {
if (foldersync) {
MephUtil.messageparserln("");
MephUtil.messageparserln("Syncing.......\n ");
MephUtil.shell(getFinalpart());
MephUtil.messageparserln("");
MephUtil.messageparserln("Syncing Complete!");
MephUtil.messageparserln("");
foldersync = false;
}
if (network) {
MephUtil.messageparserln("\n\nSyncing.......\n ");
MephUtil.shell(getFinalpart());
MephUtil.messageparser("\n\nSyncing Complete!");
network = false;
}
if (systembackup) {
Menu.halfmenu();
MephUtil.messageparser("\n" + "Running Backup configuration: " + Settings.Name);
MephUtil.shell(getFinalpart());
Settings.setSizecheckerstatus(2);
if (Settings.getSelinux() == 1) {
plugins.enableselinux();
}
if (Settings.modify != 0) {
Backup.restorefstab();
}
Settings.setCheckermessage("\nStatus of operation......\n\nFile Size = ");
MephUtil.filecheckerDie(Settings.Backuplocation + Settings.Name + ".tar");
MephUtil.messageparserln("\nBackup Complete!");
tarsize.tar();
systembackup = false;
}
if (hbackup) {
Menu.halfmenu();
MephUtil.messageparser("\n" + "Running Backup configuration.....");
MephUtil.shell(getFinalpart());
Settings.setSizecheckerstatus(2);
MephUtil.filecheckerDie(Backup.homebackuplocation + Backup.homebackupname + ".tar");
MephUtil.messageparser("\n\n" + "Backup operation complete!");
tarsize.setTar(Backup.homebackuplocation + Backup.homebackupname + ".tar");
tarsize.tar();
hbackup = false;
}
}
public static void texteditor(String configfile, String temp) {
try {
FileReader editorreader = new FileReader(configfile);
BufferedReader buffereditor = new BufferedReader(editorreader);
FileWriter editorwriter = new FileWriter(temp);
BufferedWriter buffereditorWriter = new BufferedWriter(editorwriter);
String stop = "run";
String editorr = null;
while ((editorr = buffereditor.readLine()) != null) {
if (stop.contains("run")) {
MephUtil.userinput("Welcome to the Mephiso Configuration Editor.\n\nThe configuration file *MUST* be in the same format to function correctly.\nPress enter to view the next line. Press e followed by enter to change the current line.\n\nType stop followed by enter to finish editing and save the changes.\n\n[Editing Configuration File]\n\nCurrent Line = " + editorr + "\n\nPress ok for next line. \n\n");
if (Settings.getInput() == null) {
buffereditorWriter.write(editorr + "\n");
} else {
if (Settings.getInput().equals("e")) {
MephUtil.userinput("New value: ");
String newedit = Settings.getInput();
editorr = newedit;
}
if (Settings.getInput().contains("stop")) {
stop = "stop";
}
buffereditorWriter.write(editorr + "\n");
}
}
}
buffereditorWriter.close();
} catch (IOException agfdyhtryt) {
}
try {
FileReader in = new FileReader(temp);
FileWriter out = new FileWriter(configfile);
int c;
while ((c = in.read()) != -1) {
out.write(c);
}
in.close();
out.close();
} catch (IOException tr) {
}
filecheckerDie(configfile);
MephUtil.messageparser("\n\nConfiguration Saved.....");
}
public static void choosebackup() {
if (!Settings.getRoot()) {
MephUtil.messageparser("\n\nError: You must be root for this action.");
} else {
//Scanner input = new Scanner(System.in);
int choi = 0;
MephUtil.userinput("Mephisto Backup Filesystem tools."
+ "\n\nWould you like to:\n\n"
+ "(1) Backup filesystem. \n\n"
+ "(2) Edit the configuration file \n\n"
+ "(3) Create new backup configuration. \n\n"
+ "(4) Delete configuration file. \n\n"
+ "Your choice: ");
if (Settings.getNumericalResponse() == 1) {
readconfigfile();
} else if (Settings.getNumericalResponse() == 2) {
editor();
} else if (Settings.getNumericalResponse() == 3) {
createbackup();
} else if (Settings.getNumericalResponse() == 4) {
Config.deleteconfig();
}
}
}
public static void readconfigfile() {
MephUtil.readconfigfile();
if (MephUtil.filechecker(Settings.getConfig_file())) {
MephUtil.listconfigs();
chooseconfig();
}
}
public static void chooseconfig() {
String Name;
int BackupNum = -1;
MephUtil.userinput("Saved configurations:\n\n" + Settings.listconfig + "\n\nWhich configuration would you like to load? "
+ "(enter the number, or type the name): \n\nName or number to load:");
Name = Settings.getInput();
if (Name.contains("!")) {
//return;
} else {
try {
BackupNum = Integer.parseInt(Name) - 1;
} catch (NumberFormatException n) {
/*
* It is not a number, see if it's a name!
*/
BackupNum = Settings.getConfigIndex(Name);
}
if (BackupNum == -1) {
MephUtil.messageparser("\n\nSorry, you don't appear to have"
+ " a config named " + Name);
//return;
}
// the new method below replaces the commented code. jan 16 2010 - nate
MephUtil.loadconfig(BackupNum);
previousbackup();
}
}
public static void previousbackup() {
//Added plugin to detect redhat and disable selinux as needed.
plugins.detectredhat();
backup();
}
public static void restorefstab() {
try {
String read = "";
FileReader frr = new FileReader("/tmp/fstab_original");
BufferedReader brr = new BufferedReader(frr);
FileWriter realfstab = new FileWriter("/etc/fstab");
BufferedWriter brealfstab = new BufferedWriter(realfstab);
while ((read = brr.readLine()) != null) {
brealfstab.write("\n" + read);
}
brr.close();
brealfstab.close();
} catch (IOException adas) {
}
}
public static void specificdirectory() {
String homedestination = "";
String homebackup = "";
String excludes = "";
MephUtil.userinput("Specific directory backup supports file extensions to exclude.\n\n\nThis feature is very useful to backup mounted server/filesystems accross a network.\n\nWould you like to exclude any filetypes? If so, type `yes` followed by enter. Type `no`\n\nfollowed by enter to not exclude a file. \n\nYour choice: ");
String anyexcludes = Settings.getInput();
if (anyexcludes.contains("yes")) {
excludes = getExcludes();
}
MephUtil.userinput("Directory to backup: (Make sure / is at the end) : ");
homedestination = Settings.getInput();
if (MephUtil.filechecker(homedestination)) {
MephUtil.userinput("Backup Name: ");
homebackupname = Settings.getInput();
MephUtil.userinput("Where to store the backup file: ");
homebackuplocation = Settings.getInput();
int lengthcheck = homebackuplocation.length();
String slashcheck = homebackuplocation.substring(lengthcheck,
lengthcheck);
if (slashcheck.contains(("/"))) {
} else {
homebackuplocation = homebackuplocation + "/";
}
if (MephUtil.filechecker(homebackuplocation)) {
homebackup = (Settings.path_tar + " czpf "
+ homebackuplocation
+ homebackupname
+ ".tar --exclude=/usr/src/* --exclude=/root/* --exclude=/usr/portage/* --exclude="
+ homebackupname + ".tar " + excludes + " " + homedestination);
MephUtil.messageparser(homebackup);
s = null;
MephUtil.messageparserln("");
//New way of thread handling for the GUI.
hbackup = true;
Thread tar = new Thread(new Backup());
Settings.setCheckermessage("\n\n " + "File Size= ");
Settings.setSizechecker(homebackuplocation + homebackupname
+ ".tar ");
Checker.startc();
setFinalpart(homebackup);
MephUtil.messageparserln("Backing up " + homedestination + " !");
tar.start();
} else {
Menu.halfmenu();
MephUtil.messageparser("Error: " + homebackuplocation + " not found!");
}
} else {
Menu.halfmenu();
MephUtil.messageparser("Error: " + homedestination + " not found!");
}
}
/**
* Returns a String generated by asking the user for the type of files that
* want to be excluded in the final tar. Uses StringBuffer for efficiency in
* appending excludes.
*
* @return a formatted exclude String for tar
*/
public static String getExcludes() {
StringBuffer excluded = new StringBuffer();
MephUtil.userinput("The following directories are automatically excluded:\n\n /home /sys /proc /dev /mnt /media\n\n\nFiletype/Directory to exclude i.e. *.txt to skip all .txt files (. to end): ");
String inputExclude = Settings.getInput();
// only exit when we see only a dot
while (!inputExclude.equals(".")) {
excluded.append(EXCLUDE_STATEMENT + inputExclude + " ");
MephUtil.userinput("Filetype to exclude i.e. *.txt to skip all .txt files (. to end): ");
inputExclude = Settings.getInput();
}
return excluded.toString();
}
public static void backup() {
Menu.halfmenu();
MephUtil.filecheckerDie(Settings.Backuplocation);
MephUtil.messageparser("\n\nRunning Backup configuration:\n "
+ Settings.Name + " ");
finalpart = (Settings.path_tar + " czpf "
+ Settings.Backuplocation
+ Settings.Name
+ ".tar "
+ "--exclude=/var/tmp/portage/* --exclude=/root/* --exclude=/usr/portage/* --exclude=*.deb --exclude=/tmp/* --exclude=*.rpm --exclude=/sys/* "
+ "--exclude=/proc/* --exclude=/dev/* --exclude=/mnt/* --exclude=/media/* --exclude=/home/* "
+ Settings.Excludes + " --exclude="
+ Settings.Name + ".tar" + " /");
Settings.setCheckermessage("\n Status of operation......\n\nFile Size = ");
Settings.setSizechecker(Settings.Backuplocation + Settings.Name
+ ".tar");
tarsize.setTar(Settings.Backuplocation + Settings.Name + ".tar");
//New way of thread handling for the GUI.
systembackup = true;
Thread tar = new Thread(new Backup());
Checker.startc();
setFinalpart(finalpart);
tar.start();
}
public static void createbackup() {
MephUtil.userinput("Please type a name for this backup:");
String name = Settings.getInput();
if (name == null) {
} else {
MephUtil.messageparserln("");
MephUtil.userinput("Where would you like to store this backup? "
+ "\n" + "\nExample: /tmp/ \n\n\n\nBackup Location: ");
backuplocation = Settings.getInput();
int lengthcheck = backuplocation.length();
String slashcheck = backuplocation.substring(lengthcheck,
lengthcheck);
if (slashcheck.contains(("/"))) {
} else {
backuplocation = backuplocation + "/";
}
File location = new File(backuplocation);
if (location.exists()) {
String exclude = getExcludes();
if (exclude.length() == 0) {
exclude = "none";
}
MephUtil.userinput("Woud you like to save this configuration? (y/n) ");
String save = Settings.getInput();
if (save.equals("n")) {
MephUtil.messageparserln("\n" + "\n"
+ "Thank you for using Mephisto Backup!");
} else if ((save.equals("y"))) {
try {
FileWriter out = new FileWriter(Settings.getConfig_file(), true);
BufferedWriter brout = new BufferedWriter(out);
String finall = ("\n" + "Name=" + name + "\n"
+ "Restorepath=" + restorelocation + "\n"
+ "Backuplocation=" + backuplocation + "\n"
+ "Excludes=" + exclude + "\n");
brout.write(finall);
brout.close();
} catch (IOException adsads) {
}
filecheckerDie(Settings.getConfig_file());
MephUtil.messageparser("\n\nConfiguration Saved.....");
} else {
Menu.pause("\nError: Invalid input.");
}
} else {
Menu.pause("\n\nError: Backuplocation not found!");
}
}
}
public static void editor() {
MephUtil.messageparserln("");
if (MephUtil.filechecker(Settings.getConfig_file())) {
texteditor(Settings.getConfig_file(), Settings.getConfig_file_tmp());
} else {
MephUtil.messageparser("Error: Config file does not exist!");
}
//return;
}
public static void networksync() {
String Name = "";
String seek2;
Settings.networkanswer[0] = "Name=";
Settings.networkanswer[1] = "Server=";
Settings.networkanswer[2] = "Source=";
Settings.networkanswer[3] = "Destination=";
String netreader = null;
int networkcounter1 = -1;
linecounter = 0;
MephUtil.userinput("Welcome to Mephisto Network Backup Sync!\n\nNetwork Backup Sync allows you to sync files or folders accross the network by using Rsync and ssh.\n\nIn order for this to work, you must already have a ssh key created. \n\nTo generate a key, please do the following: \n ssh-keygen \n ssh-copyid -i ~/.ssh/id.rsa.pub username@server\n\nWould you like to `l`oad` or `c`reate` or `e`dit a configuration? ");
loadcreate = Settings.getInput();
int proceede = 0;
if (loadcreate.contains("c")) {
proceede = 1;
networksynccreate();
}
if (loadcreate.contains("e")) {
proceede = 1;
networksyncedit();
}
if (loadcreate.contains("l")) {
proceede = 1;
if (MephUtil.filechecker(Config.getNetworkConfig())) {
networkcounter1 = -1;
MephUtil.messageparserln("");
StringBuffer networksaved = new StringBuffer();
try {
FileReader netfrr = new FileReader(Config.getNetworkConfig());
BufferedReader netbrr = new BufferedReader(netfrr);
while ((netreader = netbrr.readLine()) != null) {
if (netreader.contains("Name=")) {
networkcounter1++;
Settings.networkanswer[networkcounter1] = netreader;
String[] diablo = netreader.split("=");
Settings.networkanswer2[networkcounter1] = diablo[1];
networksaved.append(Settings.networkanswer2[networkcounter1]
+ "\n");
}
if (netreader.contains("Server=")) {
networkcounter1++;
Settings.networkanswer[networkcounter1] = netreader;
String[] diablo = netreader.split("=");
Settings.networkanswer2[networkcounter1] = diablo[1];
}
if (netreader.contains("Source=")) {
networkcounter1++;
Settings.networkanswer[networkcounter1] = netreader;
String[] diablo = netreader.split("=");
Settings.networkanswer2[networkcounter1] = diablo[1];
}
if (netreader.contains("Destination=")) {
networkcounter1++;
Settings.networkanswer[networkcounter1] = netreader;
String[] diablo = netreader.split("=");
Settings.networkanswer2[networkcounter1] = diablo[1];
networkcounter1 = networkcounter1 + 1;
}
if (netreader.contains("Username=")) {
Settings.networkanswer[networkcounter1] = netreader;