Backup to ZIP
Source (link to git-repo or to original if based on someone elses unmodified work):
There are some options:
- Save with compression or without.
- Save in the current folder or in a predefined backupdirectory
(changeable in /usr/bin/backup_to_zip)
SUPPORTED LANGUAGES:
German, English, French, Spanish and Czech.
If you like to translate it - you are welcome! Do it and send me then the files.
INSTALLATION:
The installation should be done as root!
1. Copy the file backup_als_zip.desktop into the folder /usr/share/apps/konqueror/servicemenus (or to where your KDE-servicemenus are)
2. Open the folder with your prefered language and copy the file Backup_to_zip into the folder /usr/bin.
3. Open the copied file and set the path to your Backupdirectory (which has to exist!).
The program should afterwards be shown in the Contexmenu of the Konqueror under
ACTIONS|BACKUP TO ZIP.
0.5a (1. May 2006):
- Spanish translation added (thanks to Alejandro Cámara Iglesias)
0.5 (30. April 2006):
- Changed Answers of last question
- Shows now the diskusage of the backupdirectory
- (Not all texts are translated into all languages. If you could translate them, please write me)
0.4a (02. April 2006):
- Czech translation added (thanks to Petr Uzel)
0.4 (31. March 2006):
- Renamed to BACKUP_TO_ZIP
- Uses now graphical interfaces (kdialog)
- Option to change the name of the backup, if more than one file is selected
- Creates a LOG-file
- More entries in contexmenu
- Repaired bug with spaces in path
- French language added (thanks to Vincent Gay)
0.3 (02. August 2005):
- Repaired bad filenames on english KDE's
- Files are now stored without leading path
0.2:
- Works now on english kde's (testet on english kde 3.1)
- English translation added
0.1 (10. May 05):
- First publication of this script
Ratings & Comments
14 Comments
This a very use tool. Thank you so much. I'm going to add it to the Ark Linux k-servicemenu collection. Check Ark out, its an interesting project.
Have to modify a bit to make it work. (.sh file) Beeps was almost useless for me so I just commented out the line. then I had problems with the date command, I changed date +'%x_%k-%M-%S' to date +'%F_%k-%M-%S' since %x option showed me time in dd/mm/yyyy format,with char "/" that I can't use in filenames. Now I just need to figure how to make zip files (here) without adding previous path (eg: if here is /home/user1 , don't have /home/user1 folder memorized in zips)
Hello mattepiu Have a look to the new version! Now it should create allowed filenames on english KDE's and the files are stored without leading paths. Because I could'nt test it on an english KDE, could you do it for me?
For some reason it still doesn't work. I gave it execute right and when i right click it does show up in the actions menu but for some reason it opens a konsole and does nothing.
hm... is there any text in the console? (The script has to start the console, so thats ok. But then, it should start the script...) I assume, you replaced both files? backup_als_zip.desktop AND backup_als_zip.sh (from the folder EN)? the script uses only the apps zip and beep. Have you them installed? Or it could be that your servicemenus-folder is on another place? Please check (and modify if necessary). On my kde, it is on ~/.kde/share/apps/konqueror/servicemenus/backup_als_zip.sh (where ~/ is a link to your home) thank you for your patience!
both files are in the servicemenus folder. I have other service menus that work normally. When the konsole opens there is no text. Thew only thing there is a solid block cursor. I waited several seconds upto 30 and nothing happens.
can you copy the shell-script (backup_als_zip.sh) into another directory (for example /tmp ) ? and then open a console in this directory and execute ./backup_als_zip.sh 0 h ./ ./backup_als_zip.sh and send me the Output of the script? ---------------- One thing, I think, that could be the problem: The Kontexmenu starts the Terminal konsole, which has to be installed.
i cpoied it to /tmp and ran the command as you said. Here is the output: ============================================================================ =============== Create Backup as ZIP-File [Version 0.2] ==================== ================== Copyright 2005 by George Ruinelli ======================= ======================= Updates: www.ruinelli.ch =========================== ============================================================================ - files/folders to safe: 1 - archive is created in: .// - archiv-name: .//./backup_als_zip.sh_(05/19/2005_20-37-26).zip - no compression ============================================================================ archiving starts now... zip I/O error: No such file or directory zip error: Could not create output file (.//./backup_als_zip.sh_(05/19/2005_20-37-26).zip) ============================================================================ ATTENTION there was an error, the scripts will stop now! please see to above error message! ============================================================================ (press enter to exit...) ./backup_als_zip.sh: line 98: beep: command not found
Hmm, I realy dont't know why it doesn't work :( My Script starts good, but then the zip-command has a problem. Can you test, if the zip-command is the problem? try to start: zip -0 -v -r ./archiv.zip ./backup_als_zip.sh (again in /tmp). If you again get an error, then it's not a failur of my program :| the warning about the missing program beep should not be a problem.
just change the date format as in my next post, that's the I/O error (%x gives "/" character wich isn't usable in filenames)
The Code is not in English. Please use english. I also get an Error. /../servicemenus/backup_als_zip.desktop has an invalid menu entry. zip1. It then repeats error about 4 or 5 times. I assume its because its not in english.
Its true, the code is (not yet) in english, but all other stuff is in english. I will translate the code in a view days (I hope). For your information: In the code is nothing you need to understand, its only a small log :) Can you explain your problem? Where do you get the error? And on which KDE-version? Because I have only a german KDE (Version 3.4) I can't test it under english conditions.
The errors pop-up when i right click on anything, a file, the desktop doesn't matter if i right click i get an error. Removing this backup as zip i no longer get any errors when i right click. Im using Kubuntu 5.04 Hoary Distro with KDE 3.4
The new version (0.2) now works on engish kde's. I too translated the script to english