Sponsored Content
Full Discussion: Problems backing up a folder
Top Forums Shell Programming and Scripting Problems backing up a folder Post 302608507 by matt_j_the_king on Saturday 17th of March 2012 04:54:16 PM
Old 03-17-2012
Problems backing up a folder

So I play on a minecraft server that keeps crashing, then rolling back, losing about 30 minutes of data. I don't own the server I'm just writing it for him. So I'm trying to have the script make a back up of the server every 5 minutes as long as it is bigger than the back up, since as more things are done the folder size increases and when it rolls back it decreases.
Code:
cd path
worldsize1=[du -s world]
worldsize2=[du -s world]
while [[$worldsize1 -lt $worldsize2 || $worldsize1 -eq $worldsize2]];do
    worldsize1=[du -s world]
    while [[$SECONDS % 300 -ne 0]];do
    done
    mkdir tempworld
    cp world /tempworld/
    cd path/tempworld
    mv world copiedworld
    cd path
    mv tempworld/copiedworld copiedworld
    rmdir tempworld
    worldsize2=[du -s world]
done

The variables path and world are the only things that will be substituted. I'm quite new to this, and I'm coding this for Solaris while running ubuntu.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

backing up

Ok I'm trying to backup a HD using ufsdump but no matter what I do it rewinds the tape after the dump. Now the tape isn't full (only 285mb) and I still have 6 more partitions I want to put on this tape. How can I stop the tape from rewinding because I can't think of anything. Also is there any... (4 Replies)
Discussion started by: merlin
4 Replies

2. UNIX for Dummies Questions & Answers

Backing Up Directories

Hi Guys, I'm writing a shell script that presents the user with various options, they select one (numbered 1-9) and it then excecutes the correct code. No problem, but I'm having slight difficulty with one option. The user can select to backup all the files in the current directory to another... (2 Replies)
Discussion started by: indigoecho
2 Replies

3. UNIX for Dummies Questions & Answers

Best practises for backing up

Hi, I'm about to start a regular backup schedule for my Linux system. I need some pointers if I may :) The system is *mainly* used as a personal home computer (it's actually a laptop running SuSE 9.2) although I do host some client material from it being a PHP developer. I know that in... (2 Replies)
Discussion started by: d11wtq
2 Replies

4. UNIX for Dummies Questions & Answers

backing up the vtoc

Can you backup the vtoc, then restore it if you somehow mess it up? This is solaris 9, x86. (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

5. Solaris

Backing up the system

Hello Mentors, Before anything else I would like to thanks to all expert here especially Pressy as he guided me to recover our server from disk failure. I posted a lot of question from these forum site concerning on how to recover our server and luckly you guys help me. Our server is now up and... (6 Replies)
Discussion started by: eykyn17
6 Replies

6. AIX

what am i backing up

we are running aix on are server. we would like to start doing online backups, but the software company that we use is not beeing much help on what files we are backing up. is there a command that will tell me what files that we are backing up. they offer a service that would back it up for use,... (3 Replies)
Discussion started by: shane.hankins
3 Replies

7. Solaris

Backing up using fssnap and ufsdump

Hi all! Here's my situation: I need to backup a running system before I can bring it down I've tried performing a ufsdump while it's in multi-user mode but my ufsdump fails because there is too much activity on the system. So I read that I could use fssnap to create a snapshot of (in my... (3 Replies)
Discussion started by: Keepcase
3 Replies

8. Shell Programming and Scripting

Need help in backing up of databases.

Hi Everyone, I am new to DBA stuff. I wonder if anyone can help me. Task is that, I have 10 databases and need to take backups of all the databases using data pump in Unix/Linux, compress them using gzip and use cron to schedule the job twice a day. Appreciate if anyone can help me in... (1 Reply)
Discussion started by: sreepriya0987
1 Replies

9. Solaris

Backing up root disks

Hi ! I wonder if in solaris 10 there is a utility similar to ignite in HP-UX that backup entire file systems (/, /usr, /var, /tmp, /home). I have to backup only the root disk of a server, but ufsdump seem to be backing up individual file systems....only, am I correct? (1 Reply)
Discussion started by: fretagi
1 Replies

10. UNIX for Advanced & Expert Users

Backing up an entire HD

Are there any recommended methods for Backing up an entire HD? I want to backup my data. I do not care about the OS file. I just want my work, movies, and music. I have about 600 GB of work, movies, and music so a bit worried about fragmentation if I just copy and paste. (1 Reply)
Discussion started by: cokedude
1 Replies
TURNIN(1)						      General Commands Manual							 TURNIN(1)

NAME
turnin - submit assignments to be graded SYNOPSYS
turnin [ OPTIONS ] -c [ course-name ] files DESCRIPTION
Submits assignments to be graded. We submit to the default project if it is not specified as an option. REQUIRED ARGUMENTS
-c, --course Sets the course to which we'll submit our assignments. files A list of files we wish to submit. They will be compressed using tar(1) and gzip(1) formats before being copied to the submission directory. OPTIONS
--version Print turnin's version -h, --help Print a help message -l, --list Prints a list of projects, along with whether or not they are enabled and shows which project is the default project. -p, --project Sets the project to which we'll submit our assignments. -C, --config Path to an alternate configuration file -v, --verbose Prints a list of submitted files once they have been submitted. -k, --keyid Cryptographically signs an assignment using gpg(1) -w, --legal Print warranty and license information. EXAMPLES
turnin -c world-cheeses --list List the projects in the course world-cheeses. turnin -c world-cheeses stilton-recipe Submit the file stilton-recipe to the default project in the course world-cheeses. turnin -c world-cheeses -p stilton stilton-recipe Submit the file stilton-recipe to the project stilton in the course world-cheeses. FILES
/etc/turnin-ng.cf ~/.turnin-ng/submissions SEE ALSO
turnincfg(1) The full documentation for turnin is maintained as a Texinfo manual. If the info and turnin programs are properly installed at your site, the command info turnin-ng should give you access to the complete manual. AUTHOR
Turnin-NG and this manpage were written by Ryan Kavanagh <ryanakca@kubuntu.org> in the summer of 2009 and are still actively maintained. Turnin-NG is a replacement for the 'project' and 'turnin' commands written in 1990 for the SPARC architecture by an unknown author. Both Turnin-NG and this manpage are distributed under the terms of the GNU General Public License version 2, or (at your option) any later version. Turnin-NG SEPTEMBER 2010 TURNIN(1)
All times are GMT -4. The time now is 12:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy