How do I backup to a specific device at an specific moment?

Here is what I want to do:
- Any night of any day in the week, connect my external HDD to my Arch computer, and go to sleep.
- At the next morning there is a backup done on that HDD.
I understand the basics on some tools which can help me do that (crond, dd, udisks), but I utterly uncapable to make it work all together, so let me ask some questions to start looking myself:
- Is it possible to use some kind of "device ID" to take a signal from udev and pipe it anywhere else?
- Which daemon could be watching in order to take that signal and execute the backup script?
Thanks for patience =P
Last edited by JMO (2011-03-26 14:56:52)

Since it's happening so infrequently (once every 24 hours), why not just set up a simple script to run every night at a time you're usually asleep?
Here are some tools you'll probably find helpful:
1) Cron: runs a specific task at set times.  Arch Wiki: Cron
(If midnight works for you, you can simply place your script in /etc/cron.daily/; it will then run each night when the clock strikes 12.)
2) rsync: copies files incrementally (i.e. only files that have changed will be copied) Arch Wiki: Rsync
In your script, you can pretty easily check to see if the drive is plugged in using its label; there's a nice set of symlinks in /dev/disk/by-label. This short script runs one or more commands if and only if a block device is attached with label yourDiskLabel.
#!/bin/bash
if [ -b /dev/disk/by-label/yourDiskLabel ]
then
#perform your backup command(s)
fi
(If, for some reason, you have multiple drives with the same label, you can use their UUID/universally unique identifier. There are a similar set of symlinks in /dev/disk/by-uuid.
just got this idea, using udev script to start a backup.
When you plug in the media it will record and it could wait a specific moment to start the backup procedure.
I would think this would just take up more resources than just checking for the drive's presence at a set time.

Similar Messages

  • HT201269 how do you backup music from old device to new device?

    how do you backup music from old iPhone 4S to new iPhone 5 ? when trying to sync it wants to delete the old music and replace it with nothing!

    http://support.apple.com/kb/ht2109
    Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • HT4847 how to get backup onto a new device

    I just bought a new iphone 4s. I want to transfer over my apps and photos from my ipod onto the the iphone4s which have been backed up on the icloud. how do i do that?

    I would recommend to set up an iPhone from an iPod backup, because they are two different devices, but you could set it up as a new device and could download all the already puchased apps for free.

  • HT201269 How can I backup more than one device using itunes? Do I need 2 seperate itune accounts?

    please respond to question above

    Syncing and backing up in iTunes can be accomplished with multiple devices. They identify the devices based on the phone number, phone name, etc. The only way you would have an issue is if you were using different calendar contacts on the computer. http://support.apple.com/kb/ht1495

  • How can I backup my iPad to another iPad backup on my same account.  They're both listed on my list of backups, but it won't let me choose to backup to the one I want on my other iPad which I no longer have.  But I specifically want the pictures

    How can I backup my iPad to another iPad backup I have on my same iCloud account.  The old one is totally gone.  Both backups are listed on my iCloud account. So is there any way I can backup the one I have now to the other one.  I really just want the pictures that are in the old backup.  I have tried resetting and erasing all settings and data on the one I still have, but when I go to restore by iCloud;  it only gives me the choice of restoring the same iPad.  Then in iCloud>storage>backup, I'm still not able to choose which backup to backup to.  I've even tried deleting the backup to the iPad I still have, then resetting all setting and data on the iPad, hoping that in resetting up the iPad it would give me the option to backup to my old iPad.  But it doesn't.  It still has memory of the backup of my newer iPad.
    I JUST WANT THE PICTURES!!!
    Thank you!!!
    iPad (3rd gen) Wi-Fi + Cellular, iOS 6.1.3, iCloud Backup

    You now need to get your pictures back! The similar to you, after I updated my iPad Mini, I can't get my some files on device. I tried many ways, fortunately, I got a tool from http://tinyurl.com/Data-Recovery-iPhone to help me recover lost files easily! It supports iPhone, iPad, iPod, etc iOS devices!

  • The backup files for my devices are saved to my internal hard drive. I have a small internal hard drive and would like them to be saved to an external drive. How can I change where iTunes automatically backs up to?

    The backup files for my devices are saved to my internal hard drive. I have a small internal hard drive and would like them to be saved to an external drive. How can I change where iTunes automatically backs up to?

    This has nothing to do with iTunes as iTunes provides no way to move or relocate the backup files.
    A search of google or the fourms would reveal ways to create a folder link to relocate the physical location where the files are stored.

  • HT4946 How do I backup ALL of my iPad content onto a newly purchased MacBook Air? I can't backup up apps or music from CDs through the device backup function.

    How do I backup ALL of my iPad content onto a newly purchased MacBook Air? I can't backup up apps or music from CDs through the device backup function.

    First you need to authorize your MBA with your iTunes account with iTunes if you haven't already done so.
    With your iPad connected and without syncing, at the iTunes menu bar go to File and select Transfer Purchases From - the name of your iPad. This will transfer/copy all iTunes content on your iPad that was purchased/downloaded from the iTunes store only.
    Photos on your iPad that were transferred from your old computer need to be transferred from your old computer to your MBA.
    Before syncing contacts with the Address Book and calendar events with iCal if you aren't syncing this content over the air with an iCloud account, enter one contact in the Address Book and one calendar event in iCal on your MBA. Make these up if needed, which can be deleted later. This will provided a merge prompt with the first sync for this data, which you want to select.
    Photos/videos in the Camera Roll can be imported by your MBA with iPhoto or the Image Capture application.

  • Upgrading to Lightroom 5.6 get message "Windows cannot access specific device path or file. You may not have the appropriate permissions to access the item" I'm running Windows 7. How do I make it work?

    Upgrading to Lightroom 5.6 get message "Windows cannot access specific device path or file. You may not have the appropriate permissions to access the item" I'm running Windows 7. How do I make it work?

    right click the installation file and click 'run as administrator'.

  • HT1766 How can I select an older backup to restore my device from, rather than restoring from last backup performed?

    I did a backup after doing a sync with my iTunes only to find that I un-ticked the sync apps box, resulting in my apps to be deleted and most of them losing their data. I have all the data of these apps on backups I did previously to the most recent one but don't know how to select older backups.
    Is their anyway to restore my device from an older backup, rather than the most recent one?

    Knowing where backups are stored is one thing, interpreting them (and getting them back to your iOS device) is another!
    If you did your sync, but no backup immeiately after it (for some reaon some people do) then you may have success. Without connecting your iPad to our computer, go to the screen I mentioned in my earlier post and put a tick in the box PREVENT IPOD .... FROM BACKING UP AUTOMATICALLY and click OK. Then connect your iPad and restore from the previous backp if it is there! You can then go back and change the PREVENT...... setting.
    When you get this all sorted out you can consider iCloud for additional backups. If you do not use iCloud routinely then you can switch it on temporarily to do a manual backup, even multiple backups.
    However, you can trick iTunes into doing additional backups by changing the device name. For instance, you can do a backup under the device name of, say, Liam's iPad, then change the iPad name to Liam's iPad 1, Liam's iPad 2, etc with a backup under each name! Whichever backup name you use in due course to restore your iPad is the name that will appear as your device name under Settings on the iPad.

  • Is there a way to sync past messages from my old iPhone to my iPhone 5 ? I'm aware of the iTunes backup syncing but how would I transfer that between two devices ?

    Is there a way to sync past messages from my old iPhone to my iPhone 5 ? I'm aware of the iTunes backup syncing but how would I transfer that between two devices ?

    Restore from old iPhone backup can past all data including messages to your new iPhone. Or you can resfer to this iPhone 4/4S SMS to iPhone 5 transfer tutorial. It shows you how to transfer messages only.

  • How do i backup a specific backup from icloud on my iphone 5

    how do i backup a specific backup from icloud on my iphone 5

    Welcome to the Apple Community.
    What do you mean 'back up a back up'

  • I've activated a new iPhone 6 from the backup of the previous device and all pre-installed iWork apps got lost. How do I get them back? AppStore downloads are offered with a fee.

    Hi all!
    I've activated a new iPhone 6 (iOS 8.1.3) from the backup of the previous device and all pre-installed iWork apps got lost. How do I get them back? AppStore downloads are offered with a fee. Any advices?
    Thanks in advance.
    Harald

    Hi Ingo,
    thanks for your help. Your hint didn't solve my problem but pointed me in the right direction.
    When I wanted to activate my new phone from backup I realized, I didn't knew the password. It was noted on a paper at home. So I activated the phone free cause I couldn't await coming home ... a new toy!
    Due to GameCenter I have two apple-ids and unfortunately I took the wrong for the activation.
    Back home I've reset the phone and activated it from backup. The iWork apps disappeared and now are linked to the other apple-id.
    I was able to re-install the apps from AppStore for free. But I don't think I can transfer the apps to the other id.
    Thanks a lot
    Harald

  • I am changing from an iphone 3 to an iphone 3g and i was not offered an option to restore the new device from a backup of the old device - how do i reset the new device to do this?

    i am changing from an iphone 3G to an iphone 3GS and i was not offered an option to restore the new device from a backup of the old device - how do i reset the new device to allow me restore the data from the old one to the new one?

    Go to Settings>General>Reset>Erase All Content and Settings.  This will return it to its new out of the box condition.  Go through the setup screens again and you will be given the option to restore from a previous iTunes or iCloud backup (see http://support.apple.com/kb/HT2109).

  • How do I restore apps to multiple devices?

    I will be giving iPads to my children for Christmas. How do I restore the saved data for each game/app to a specific device?
    Here's my scenario. My wife and I each have an iPad on the same iTunes account. My children play the same game, but to preserve each other's progression, my son plays this game only on one iPad while my daughter plays it on the other.
    When I setup the new iPads, how do I restore my son's saved data to his iPad and my daughter's data to hers?
    Both children use each iPad so a full restore doesn't help.
    Can I pick-and-choose what saved data from what app goes to which new iPad?

    JimHdk wrote:
    Thanks for clarifying that the situation is more complex than described in your original post.
    No, you cannot pick and choose with standard restore procedures.
    There are some PC/Mac programs that allow recovering certain things from backup files. Whether these can restore arbitrary app data I do not know. I suspect not but you can investigate further.
    For example:
    http://www.iphone-ipad-recovery.com/recover-data-from-dead-broken-ipad.html
    http://www.iphone-data-recovery.com/restore-ipad-from-backup.html
    Hello, I can't scan out my lost data from iPad directly, doesn't it means that I only can recover my lost data from backup?

  • HOW CAN I CONTROL MY STOLEN BLACKBERRY DEVICE CURVE 2

    Hi,
    Pls, I need a guide on how I can control my stolen Blackberry device curve 2. I have been able to get new SIM number on the device after it has been stolen. I have been chatted with the new user.
    Pls, send me a guide.
    Thanks.

    Please, read this:
    Lost or Stolen BlackBerry -- What to do?
    If there are specific questions not covered in that FAQ, please ask.
    But, there is no "guide to controling your lost BlackBerry"... no such thing.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

Maybe you are looking for