Saving and Restoring a class using Persistence Delegate

Hi, I have a class that does not comply to the java bean format and thus I have decided to use persistence delegates. All I want to do is be able to save an entire class so I can restore it later.
So this is what I did:
XMLEncoder xe = new XMLEncoder(
new BufferedOutputStream(
new FileOutputStream(filename)));
xe.setPersistenceDelegate(Workspace.class,
new PersistenceDelegate()
protected Expression instantiate(Object oldInstance, Encoder out)
return new Expression(oldInstance, oldInstance.getClass(),
"new", new Object[]
oldInstance,
oldInstance,
oldInstance,
oldInstance,
oldInstance,
oldInstance,
oldInstance,
oldInstance
xe.writeObject(workspace);
xe.close();
Where workspace takes in a BufferedImage, int, int, int, int, int, String and String.
The workspace class Vectors and an array of another class of mine.
When I run this code I get : java.lang.StackOverflowError
Can someone point me in the right direction please?
Thanks in advance,
Harley.

When you post code, please use [code] and [/code] tags as described in Formatting Help on the message entry page. It makes it much easier to read.

Similar Messages

  • I pod disabled  and cant remember passcode. cannot use itunes as it wants update and restore  need to use passcode and the hold sleep/wake key and home key doesnt put it in DFU either . any help ?

    My ipod has been disabled as I cant remember the passcode . When doing a restore on I Tunes it will only update and restore , the update doesnt work as the phone is locked and I need a passcode. I have tried the other way which is to hold the sleep/wake key and home key together  for 10 seconds but as soon as you plug it inot the pc the ipod boots up so this method doesnt work either . Very close to usin it as a brick , any suggestions ?? Thank you

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:                                                             
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:                         
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.
    Dry another cable
    Next try on another computer.
    Last
    Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • Saving and restoring JTable layout

    Users can manipulate a JTable by resizing reordering columns.
    I want to be able to save the layout of the table and restore it the next time a user runs the application.
    I've gotten it to work for column sizing, but what do I interrogate to find out how a user has reordered the columns?

    but what do I interrogate to find out how a user has reordered the columns?Look at the TableColumnModel to see the current order of the columns.

  • I can't create or view saved and favourites in kuler using CS6

    I'm new to Kuler and havent' used it before so it could just be me but I have extensively searched for the answers.  Using Illustrator CS6 v16.2.1 latest updates from CC.  Eventually managed to find the elusive Panel selection in Window > Extensions.  Now I have access to the panel it doesn't seem to have options to 'Browse Create About'  as seen in all of the tutorials.  This leaves me unable to Create themes from Ai or view my saved files and favourites that I created from the Kuler website.  It does however seem happy to display public themes when I use the search presets.
    I also don't seem to be able to create favourites from Ai.
    I have de-activated and re-activated the cloud and logged in and out of Kuler, all using the same credentials.

    Thanks Shamit_mehta, downloaded CC and all good.  As frustrating as it was, it was well worth the effort.  Loving Kuler.  I couldn't find a place on the web that told me what versions have what functionality.  Is there such a place?  Otherwise it's a bit of a mission sometimes when  you are not getting the results that you expect and don't know why.

  • CAT6500 - VLAN DATABASE saving and restoring - question

    If one wants to change the SUP720 module on a CAT6500, then how is the VLAN DATABASE trasnfered from original to new module. For startup config one can tftp the config from old module and then tftp back the same into new module. How about vlan database. Is there any way of copying vlan database from old module to a tftp server and then back into new module.

    You can copy the vlan.dat using tftp from the const_nvram:. Under that location should should see a file vlan.dat. But as you are warned when you enter the vlan database, vlan.dat is being deprecated and it is recomended to add or delete vlan from the configuration mode. Vlan from the confguration mode is saved in the start-up configuration.
    Router#dir const_nvram:
    Directory of const_nvram:/
    1 -rw- 616 vlan.dat
    126956 bytes total (126340 bytes free)
    Router#copy const_nvram:vlan.dat tftp
    Address or name of remote host []? 10.1.1.1
    Destination filename [vlan.dat]?
    Please rate helpful post.

  • Saving and restoring list selections

    I've got a list control in a popup window, supplied by a
    dataProvider. The user makes selections, clicks OK, and the
    selections are processed -- it all works fine.
    However, since it's a popup window, when it's closed the
    SELECTION is lost. When the window is opened again, the list has
    nothing selected (as expected).
    My question is, how do I save what items were selected, and
    then show them as selected again when I re-display the list?
    Thanks.

    Thanks.
    What if the data provider is NOT at the root, but in a
    component?
    In my root app, I have an MXML component referenced
    (id="s1"). It's THAT component that's calling the popup and
    contains the dataProvider.
    How does the window refer to the component that called it?
    I'm trying to leave this generic, rather than specific, so I can
    use the same popup component several places in the app.
    There are multiple components (s1, s2, s3 etc) that call this
    window, and I keep the dataProviders in each of these components.
    So the window needs to be able to "find" the _aSelectedItems
    relating to the screen that "celled" it.
    Thanks.

  • Saving and restoring boot drive data

    Hi,
    Sorry, I'm sure this topic has come up a million times, but I'd greatly appreciate advice on transferring all the files from my present start up drive (Macintosh HD icon) to an external drive so that I can replace the present 125GB drive with a 250 GB one (which will become the new boot drive, home to all my important system files, startup items, prefs etc. etc. I've replaced other drives in my G4, but never the 'brain' - so I'm a little scared!
    I've heard about Carbon Copy Cloner - would that do the job? How does it work? (I need to retain dual-boot OS 9/X capability) I know it's a free download, and isn't it as good as Superduper, which is shareware for $$? Or what does the latter do better?
    Of course, my main concern is getting all the files to transfer back to the new drive once it's installed. I've heard there are obscure files buried deeply in the roots of the system that are also vital to operation and if not there, would mess everything up - or at least perhaps cause unexpected disasters and horrible moments...maybe I'm exaggerating.
    Anyway, thanks in advance for advice on a successful and fairly painless main-drive transplant!
    Keith

    Hello Again! Correct in just moving the data drive into the other computer just be sure when moving these disks around that the jumpers are set correctly. Just remember that there are only two drives on an ide/ata cable. If one is jumpered "cable select" they both must be jumpered that way. If one is "master" and on the end of the cable then the other one must be jumpered "slave". The purpose in zeroing the new drive is because often times they do in fact have some bad blocks and if critical system info were to be written to those blocks it could crash the system. I recently installed a new drive and it had two bad blocks. Once you clone the drive go to the system prefs and open the startup disk pane and select the drive you want to startup from and then restart. Kappy means to start in safe mode is to startup holding the shift key down.
    A couple of things to do before starting all this. One repair permissions in disk utility and second startup from another drive (if you already have a bootable system on another disk or from the install disc if you do not) and repair the main drive to be sure the directory is in good shape before you clone it. I personally use DiskWarrior for this but the disk utility will repair common problems.
    In step five he means select the destination drive (the new drive) that you are cloning to and drag it to the destination field and then select the source drive (the startup bootdisk) and drag it to the source field.
    I'd also unhook the external firewire if you are not cloning to it at this time. Before you physically remove the boot drive be sure the clone is working correctly and I wouldn't erase it until I was satisfied the clone was working correctly after a few days of use.
    Once you are satisfied with everything you can remove the original drive and put a bigger one in its place.
    The most important thing is to be sure you understand the jumper settings because if you get them wrong you may not be able to erase the drive to start with and the clone may not work correctly.
    The earlier G4's often won't work with the drives set to cable select and you have to resort to the master and slave settings but if the drive on the particular ide/ata cable is using the cable select setting use the cable select setting for the other drive going on that cable.
    On a last note if you need larger drives in a 128 gig max computer consider a SATA pci card. I have a couple of Sonnet 2 port SATA cards that are bootable (not all are bootable) in my 128 gig limited G4. In fact I have 2 of the Sonnet cards in my G4 running four 320 gig drives!
    Once you've done this it becomes much easier. Just be sure to have time to think out what you are doing and allow time to complete the job at your pace and don't erase anything until you are sure of how everything is working. Tom

  • Saving and restoring sets of open applications and documents

    Sometimes I have to restart when I have 20 to 30 Word and Excel files, websites, etc., open for work. It's time-consuming to go back and open them all up and get them positioned on various virtual desktops so I can get back to productive work, and every time I do it I swear there's got to be a utility that will save the state of these applications and their open documents for later restoration. Yet I've never been able to find an application to do this. Has anyone dealt with this issue successfully?
    Thanks.

    AFAIK, when you select Restart, you should get a dialog box for each unsaved, open document that allows you to save it, before the app will quit. If that's not working, then you should manually save the open documents and quit the app before you restart.

  • My location services are frozen. Can I use my personal hotspot to backup and restore my phone?

    My iPhone 4S was upgraded from the 6.1.2 to 6.1.3 and I expierenced a major malfunction. Immeadily after the upgrade my daughter installed a 4 shared app then she went on line and downloaded AppCaster. The AppCaster crashed then my google latitude app crashed. Now my location services are frozen. Is there any way I can back up and restore my iPhone using my personal hotspot. I can't get to a public hotspot to use my icloud backup?

    one cant use the personal hotspot feature to restore the device coz the phone will d/connect as soon the restoration process is underway. you will need a PC/laptop t ocomplete this process,in case you dont then ,maybe go to the apple store and request them to restore it for you from icloud

  • Backpac: A package state snapshot and restore tool for Arch Linux

    backpac:
    A package state snapshot and restore tool for Arch Linux with config file save/restore support.
    https://aur.archlinux.org/packages.php?ID=52957
    https://github.com/altercation/backpac (see readme on the github repository for more information)
    Summary & Features
    It's a common method of setting up a single system: take some notes about what packages you've installed, what files you've modified.
    Backpac creates those notes for you and helps back up important configuration files. Specifically, backpac does the following:
    maintains a list of installed groups (based on 80% of group packages being installed)
    maintains a list of packages (including official and aur packages, listed separately)
    maintains a list of files (manually created)
    backs up key config files as detailed in the files list you create
    The package, group and files lists along with the snapshot config files allows system state to be easily committed to version control such as git.
    Backpac can also use these lists to install packages and files. Essentially, then, backpac takes a snapshot of your system and can recreate that state from the files and lists it archives.
    Use Cases
    Ongoing system state backup to github
    Quick install of new system from existing backpac config
    Conform current system to given state in backpac config
    Backpac is a very, very lightweight way of saving and restoring system state.
    It's not intended for rolling out and maintaining multiple similar systems, it's designed to assist individual users in the maintainance of their own Arch Linux box.
    Status
    Alpha, release for testing among those interested. Passing all tests right now but will continue to rework and refine. Bug reports needed.
    Why?
    There are a lot of 'big-iron' solutions to maintaining, backing up and restoring system state. Setting these up for a single system or a handful of personal systems has always seemed like overkill.
    There are also some existing pacman list making utilities around, but most of them seem to list either all packages or don't separate the official and aur packages the way I wanted. Some detect group install state, some don't. I wanted all these features in backpac.
    Finally, whatever tool I use, I'd like it to be simple (c.f. the Arch Way). Lists that are produced should be human readable, human maintainable and not different from what I'm using in non-automated form. Backpac fulfills these requirements.
    Regarding files, I wanted to be able to backup arbitrary system files to a git repository. Tools like etckeeper are interesting but non /etc files in that case aren't backed up (without some link trickery) and there isn't any automatic integration with pacman, so there is no current advantage to using a tool like that. I also like making an explicit list of files to snapshot.
    Sample Output
    This is the command line report. Additionally, backpac saves this information to the backpac groups, packages and files lists and the files snapshot directory.
    $ backpac -Qf
    backpac
    (-b) Backups ON; Files will be saved in place with backup suffix.
    -f Force mode ON; No prompts presented (CAUTION).
    (-F) Full Force mode OFF; Prompt displayed before script runs.
    (-g) Suppress group check OFF; Groups will be checked for currency.
    (-h) Display option and usage summary.
    (-p) Default backpac: /home/es/.config/backpac/tau.
    -Q Simple Query ON; Report shown; no changes made to system.
    (-R) Auto-Remove OFF; Remove/Uninstall action default to NO.
    (-S) System update OFF; No system files will be updated.
    (-U) backpac config update OFF; backpac files will not be updated.
    Sourcing from backpac config directory: /home/es/.config/backpac/tau
    Initializing.................Done
    GROUPS
    ============================================================================
    /home/es/.config/backpac/tau/groups
    GROUPS UP TO DATE: group listed in backpac and >80% local install:
    base base-devel xfce4 xorg xorg-apps xorg-drivers xorg-fonts
    GROUP PACKAGES; MISSING?: group member packages not installed:
    (base: nano)
    (xfce4: thunar xfdesktop)
    PACKAGES
    ============================================================================
    /home/es/.config/backpac/tau/packages
    PACKAGES UP TO DATE: packages listed in backpac also installed on system:
    acpi acpid acpitool aif alsa-utils augeas cowsay cpufrequtils curl dialog
    firefox gamin git ifplugd iw mesa mesa-demos mutt netcfg openssh rfkill
    rsync rxvt-unicode sudo terminus-font vim wpa_actiond wpa_supplicant_gui
    xmobar xorg-server-utils xorg-twm xorg-utils xorg-xclock xorg-xinit xterm
    yacpi yajl youtube-dl zsh
    AUR UP TO DATE: aur packages listed in backpac also installed on system:
    flashplugin-beta freetype2-git-infinality git-annex haskell-json
    package-query-git packer wpa_auto xmonad-contrib-darcs xmonad-darcs
    AUR NOT IN backpac: installed aur packages not listed in backpac config:
    yaourt-git
    FILES
    ============================================================================
    /home/es/.config/backpac/tau/files
    MATCHES ON SYSTEM/CONFIG:
    /boot/grub/menu.lst
    /etc/acpi/handler.sh
    /etc/rc.conf
    /etc/rc.local

    firecat53 wrote:I think your plan for handling an AUR_HELPER is good. If AUR_HELPER is defined by the user, then either you might need a list of major AUR helpers and their command line switches so you can pick the correct switch for what needs to be done (most use some variation of -S for installing, but not all), or have the user define the correct switch(es) somehow for their chosen AUR helper.
    That's a good idea. I'll add that to my AUR refactoring todo.
    I also found directory tracking to be a weakness in other dotfile managers that I tried. I think you would definitely have to recursively list out the contents of a tracked directory and deal with each file individually. Wildcard support would be nice...I just haven't personally found a use case for it yet.
    I've been thinking that I could just add the directory and scan through it for any non-default attribute files. If those are found then they get automatically added to the files list. That's pretty close to what etckeeper does.
    Edit: I just compiled the dev version and removed my comments for already fixed things...sorry!
    The master branch should have those fixes as well, but I didn't update the version number in the package build. I'll have to do that.
    1. Still apparently didn't handle the escaped space for this item: (the file does exist on my system)
    Ok, good to know. This wildcard directory business will require some new code and refactoring so I'll also rework my filenames handling.
    2. Suggestion: you should make that awesome README into a man page!
    I was working on one (the pkgbuild has a commented out line for the man page) but I had to leave it for later. Definitely want a man page. Once this stabilizes and I'm sure there aren't any big structural changes, I'll convert it to man format.
    3. Suggestion: add the word 'dotfile' into your description somewhere on this page, the github page, and in the package description so people looking for dotfile managers will find it. You could also consider modularizing the script into a dotfile manager and the package manager, so people on other distros could take advantage of your dotfile management scheme.
    I actually have a different script for dotfile management that doesn't touch packages, but there is definitely overlap with this one. That script isn't released yet, though, and if people find this useful for dotfile management that's great. I'll add that in.
    4. Suggestion: since -Q is a read-only operation, why not just make it run with -f automatically to avoid the prompt?
    Originally, running backpac without any command line options produced the Query output. I was concerned that since it is a utility that can potentially overwrite system files, it is important to give users a clear statement prior to execution about what will be done. Since the Query output is essentially the same as the Update and System reports in format and content, I wanted to be explicit about the Query being a passive no-change operation. The current command line options aren't set in stone though. If you feel strongly about it being different, let me know.
    Long answer to a short question
    5. Another suggestion: any thought to providing some sort of 'scrub' function to remove private information from the stored files if desired? This would be cool for publishing public dotfiles to github. Perhaps a credentials file (I did this with python for my own configs). Probably detecting email addresses and passwords without a scrub file would be rather difficult because dotfiles come in so many flavors.
    Yes, absolutely. In fact, if you look at the lib/local file (pretty sure it's in both master and dev branches in this state) you'll see some references to a sanitize function. The idea there is that the user will list out bash associative arrays like this:
    SANITIZE_WPA_=(
    [FILE]='/etc/wpa_supplicant.conf'
    [CMD]='sed s/expungepattern/sanitizedoutput/g'
    Question: am I missing an obvious option to remove a file from the files.d directory if I delete it from the files list? Or do I have to delete it manually? It might be helpful to add a section to the README on how to update and delete dotfiles from being tracked, and also a more detailed description of what the -b option does (and what is actually created when it's not used).
    You are only missing the function I didn't finish. There should be either dummy code or a TODO in the backpac main script referencing garbage collection, which isn't difficult but I just haven't finished it. The idea being another loop of "hey I found these old files in your files.d, mind if I delete them?" It's on my list and I'll try to get it in asap.
    And finally, just out of curiosity, why did you choose to actually copy the files instead of symlink like so many other dotfile managers do?
    git not following symlinks, hardlinks also out for permissions issues (git wouldn't be able to read the files, change them, etc.)
    I definitely would prefer to not make an entire copy of the file, but I haven't come up with a better option. Shout with ideas, though. Also, if there is a way around the link issues I noted above, let me know. I don't see one but that doesn't mean it's not there.
    edit: I think a Seattle area Arch meetup would be cool! Perhaps coffee someplace? Bellevue? U-district? Anyone else? BYOPOL (bring your own pimped out laptop)
    A general meetup sounds good. I was also thinking it would be fun to do a mini archcon with some demos.

  • Backing up and restoring site definitions

    Losing your site definitions in Dreamweaver can be a disaster, but it does happen sometimes. The best way to prepare for such an eventuality is to back up your site definitions on a regular basis.
    Creating a backup
    You can back up all your site definitions in a single operation by selecting Site > Manage Sites. In the dialog box that opens, Shift-click to select all site names, and then click Export.
    In Dreamweaver CS6, the Manage Sites dialog box looks like this:
    In earlier versions of Dreamweaver, it looks like this:
    Dreamweaver asks if you want to include passwords and login details (this is the default option). Whichever option you choose will be applied to all sites, so click Cancel if you want to treat some sites separately, and export your sites in two sets by using Ctrl/Cmd-click to select them.
    When you click OK, Dreamweaver asks where you want to export the definitions. Navigate to a suitable location, leave the File name field unchanged, and click Save. Although only one site name is listed in the File name field, Dreamweaver exports all the site definitions as .ste files in a single operation.
    NOTE: This process backs up only the details of your sites, such as the location of the root folder, FTP details, and so on. It does not back up the actual files in your site, such as .html (or .php, .asp, .cfm) files, images, and style sheets. It's a good idea to use your normal file backup routine on your actual files from time to time, as well as exporting the site definitions.
    Restoring site definitions
    In the event of losing your site definitions in Dreamweaver or moving to a new computer, open the Manage Sites dialog box, and use the Import button to navigate to your backup .ste files.
    What if I don't have a backup?
    Often, if you don't have a backup of .ste files, you need to go through the whole process of re-entering the details for each site manually.
    However, you might be able to restore them by using a restore point on Windows or Time Machine in Mac OS X.
    On Windows, the site definitions for Dreamweaver CS6 are stored in the Windows Registry at HKEY_CURRENT_USER\Software\Adobe\Common\12.0\Sites.
    In Mac OS X, they are at Macintosh HD:<username>:Library:Application Support:Adobe:Common:12.0:Sites:Site Prefs.
    In recent versions of Mac OS X, the Library folder is hidden. In the Mac Finder, select Go > Go to Folder, type ~/Library in the search field, and click Go.
    Dreamweaver CS5.5 site definitions are in the same location, except use 11.5 instead of 12.0. The numbers for CS4 and CS3 are 10 and 9 (without a decimal fraction) respectively. For earlier versions of Dreamweaver, substitute Macromedia for Adobe, and adjust the number accordingly.
    If you don't have a backup of the actual files on your site, download the files from your remote server.

    Hello,
    We are running iPlanet 5.2 Messaging Server and need
    to migrate to another (duplicate) 5.2 Messaging
    Server. We have all the software installed and the
    LDAP user accounts created. Now we just need to move
    the existing mail from one server to the other.
    I found the Backing Up and Restoring the Message
    Store section in the Admin Guide says to back up and
    restore your data, Messaging Server provides the
    imsbackup and imsrestore utilities.
    However I am wondering about the Queue?
    Under <instance>/imta/queue
    What is the difference between the Message Store
    and the Queue? The Message Store is where messages get delivered to, so you can read them.'
    The queue is where messages are temporarily stored, pending delivery to wherever they go.
    You can use tar, cpio, or what have you for the queue. Stop the server first. . .
    You then just restore the files to the new server. No need to restart or anything like that. Just dump the files in, and run
    imsimta cache -sync
    to tell the MTA to re-read the queue.
    Can I just backup and restore the
    Queue using tar or cpio?
    Thanks in advance for any advice.
    Regards,
    Tim

  • Backing Up and Restoring the Message Store v.s. the queue

    Hello,
    We are running iPlanet 5.2 Messaging Server and need to migrate to another (duplicate) 5.2 Messaging Server. We have all the software installed and the LDAP user accounts created. Now we just need to move the existing mail from one server to the other.
    I found the Backing Up and Restoring the Message Store section in the Admin Guide says to back up and restore your data, Messaging Server provides the imsbackup and imsrestore utilities.
    However I am wondering about the Queue?
    Under <instance>/imta/queue
    What is the difference between the Message Store
    and the Queue? Can I just backup and restore the Queue using tar or cpio?
    Thanks in advance for any advice.
    Regards,
    Tim

    Hello,
    We are running iPlanet 5.2 Messaging Server and need
    to migrate to another (duplicate) 5.2 Messaging
    Server. We have all the software installed and the
    LDAP user accounts created. Now we just need to move
    the existing mail from one server to the other.
    I found the Backing Up and Restoring the Message
    Store section in the Admin Guide says to back up and
    restore your data, Messaging Server provides the
    imsbackup and imsrestore utilities.
    However I am wondering about the Queue?
    Under <instance>/imta/queue
    What is the difference between the Message Store
    and the Queue? The Message Store is where messages get delivered to, so you can read them.'
    The queue is where messages are temporarily stored, pending delivery to wherever they go.
    You can use tar, cpio, or what have you for the queue. Stop the server first. . .
    You then just restore the files to the new server. No need to restart or anything like that. Just dump the files in, and run
    imsimta cache -sync
    to tell the MTA to re-read the queue.
    Can I just backup and restore the
    Queue using tar or cpio?
    Thanks in advance for any advice.
    Regards,
    Tim

  • How to backup and restore postgres, How to backup and restore postgres

    Hi!
    Yesterday I had a major hickup while trying to configure some OD stuff. Since I was still setting up Lion Server, I just decided to go back and restore the system using a Time Machine backup from a few hours earlier. Went well... except that anything to do with postgres was not working anymore: web pages, wiki, iCal, etc Postgres would not start anymore. I could not find anything on the internet and after a few hours of trying gave up and just did a fresh, clean install. Fortunately there were not many user files on yet, but I did lose everything I noted in the wiki since I migrated the old Snow Leopard content.
    SO, HERE comes the question: is there a fool-proof way of backing up all Lion Server postgres databases and, more importantly, to actually get the thing back up after a Time Machine restore? I know I can dump all db's using pg_dumpall, but what would be the steps to get this back up and running should I need to? I have restored many MySQL databases in the past, but never were they directly linked to many OS functionalities.
    The "Advanced Administration" document of course is not advanced enough for this. Is there anywhere I real guide on "How to restore and make function your Lion Server after a major desaster", like hard disk failure?? Would be very helpful, in case it's needed but also for peace of mind.
    Thanks lot! Appreciate any input!
    Cheers,
    Hendrik

    Take my little script here and adjust it to your requirements. I got the base of this script somwhere else and enhanced it myself. Read some explanations below:
    # #!/bin/bash
    if (test "`whoami`" != "root") then
            echo "You need to be root to start this"
            exit 1
    fi
    PG_PORT="5432"
    PG_USER="_postgres"
    PG_BIN="/usr/bin/"
    ACT_DATE=$(date '+%y-%m-%d')
    EXP_DATE=$(date -v -2w '+%y-%m-%d')
    BACKUP_DIR="/Backups/postgres"
    LOGFILE=$BACKUP_DIR"/_pg_backup.log"
    COMPRESSION="9"
    PG_CON="-U $PG_USER"
    BACKUP_OPTIONS="$PG_CON -b -C -F c -Z $COMPRESSION"
    VACUUM_OPTIONS="$PG_CON -eq"
    echo "***** DB_BACKUP $ACT_DATE *****" >>$LOGFILE
    for db in `$PG_BIN/psql $PG_CON -lt | sed /\eof/p | grep -v = | awk {'print $1'}`
      do
        # vacuum
        if [ "X" == "X$db" ]; then
              continue;
        fi
        echo $(date '+%c')" -- vacuuming database $db" >> $LOGFILE
        if $PG_BIN/vacuumdb $VACUUM_OPTIONS $db
          then
          #echo "OK!" >>$LOGFILE
              sleep 1
        else
          echo "No Vacuum in database $db!" >>$LOGFILE
        fi
        # backup
        echo $(date '+%c')" -- backing up database $db" >>$LOGFILE
        if  $PG_BIN/pg_dump $BACKUP_OPTIONS -f $BACKUP_DIR/$db-$ACT_DATE.pgdump $db
          then
          if [ -e $BACKUP_DIR/$db-$EXP_DATE.pgdump ]; then
              echo $(date '+%c')" -- deleting old backup" >>$LOGFILE
              rm $BACKUP_DIR/$db-$EXP_DATE.pgdump
          fi
        else
          echo "FAIL Database $db backup!" >>$LOGFILE
        fi
      done
    This script dumps all databases in postgres individually.
    Databases are vacuumed and then dumped.
    Dump-Format is currently set as compressed pgsql dump (See "-F c" in $BACKUP_OPTIONS)
    File names consist of "databasename"-"backupdade".pgdump
    I have programmed to automatically purge backups older than two weeks (see " -2w " in $EXP_DATE)
    If you drop a database you will have to remove backups for that database manually.
    I have enabled a daily run of this scrip by placing the executable script somwhere and add it to the crontab of root: sudo crontab -e
    Enter the following line and your backups start every day at 6:00. Adjust paths and scriptname according to your own setup.
    0 6 * * *       ~/.bin/postgres_dump.sh > /dev/null 2>&1

  • HT1212 i did all the following info on how to unlock my iphone but stil lock and i can't use it, please if someone can help me

    My iphone was locked and i can't remember my passcode i did all the info on how to unlock my iphone but still did not work

    If you forget your passcode there is only one way to remedy the situation.
    Put your phone in recovery mode and restore the device using iTunes.
    HT1808 iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808

  • IPhone unlocked and restored from backup .. still unlocked?

    I recently unlocked my iPhone 4S through iTunes successfully receiving the "Congrautlations...." message. However, after this I restored it from a backup as to not lose all of my contacts, texts, photos, etc. Now it says my carrier is still AT&T. By restoring the phone, did I cancel out the unlock? Do I just have to restore it to factory settings and lose all of my data? I've read thoroughly Apple's instructions and it does not state this anywhere. Thank you!

    Yes, the instructions for the unlock came through ATT&T. I'll copy and paste the text from that e-mail (from July) here:
    Thank you for contacting AT&T Customer Care about unlocking your AT&T Mobile device.
    We have reviewed your request and confirmed that the device may be unlocked. You should complete the unlock process before porting out your number for use with another carrier. Please allow 24 hours upon receipt of this notification to complete the unlock process.
    1. Open iTunes on your Mac or PC and verify that you have Internet connectivity.
    2. Ensure the original SIM card that came with this device is inserted in your iPhone.
    3. Connect your iPhone using the dock connector to USB cable that came with your iPhone.
    4. Backup and restore your iPhone using iTunes. For information on backup and restore, please visit http://support.apple.com/kb/HT1414. 5. After restoring, your iPhone will be unlocked.
    Additional information on unlocking can be found at http://support.apple.com/kb/TS3198 For questions regarding AT&T Mobile device, please visit the Phone/Device Learning Center. Thank you for your business.
    For other questions about our AT&T wireless service or other Mobile devices, please visit att.com.
    Sincerely, AT&T Customer Care Team

Maybe you are looking for

  • Budget is not getting displayed in Report S_ALR_87013558

    Hi Friends, For project the budget is not getting displayed in Report S_ALR_87013558 though the budget is planned by TCode: CJ30 and released also by TCode: CJ32 Is there any setting in customising in information systems to display in the report. Ple

  • ADF - Component File Download Listener - Setting the output filename

    Studio Edition Version 11.1.1.2.0 Hi, I would like to learn how to set the output filename as current data + filename. I have a button with the component File Download Listener that has theses parameters Content/Type: application/pdf Filename: test.p

  • Suppression of warnings - Urgent

    The system is BW 7.0 Had a small problem At the query designer level, description of a few info objects is changed as per reporting needs. On running the query in the web mode, they get a warning stating Characteristic & was changed in InfoCube &. Ad

  • Opening Title Sequence - Technical & Aesthetic Ideas?

    I am about to embark on a Project and am working out the details of the opening title sequence. Here's what I envision. The sequence opens with a still image. Slowly, blue paint drips down from the top of the frame and finally covers the still image.

  • What is ap and ar open item revaluation

    hi in the month end ap/ar open item revaluation mean what/why should we do.plz tell me thank u sowmya