October 15, 201510 yr I was wondering if there was a way to clone my unraid box to where if my main one fails (or happens to burn to a crisp) the second one could turn on and have everything the same including dockers.
October 15, 201510 yr I can't really speak to a direct clone. I know that some users use cron to do scheduled backups of the array data to a second unraid box. I don't know about dockers or vm's.
October 15, 201510 yr Author this would be fine if there is a way to setup my cloud server (pydio) with all the data still there again, but i don't think there is a way. Is there?
October 15, 201510 yr this would be fine if there is a way to setup my cloud server (pydio) with all the data still there again, but i don't think there is a way. Is there? You could setup a cron job to sync your appdata folders.
October 16, 201510 yr Author this would be fine if there is a way to setup my cloud server (pydio) with all the data still there again, but i don't think there is a way. Is there? You could setup a cron job to sync your appdata folders. Any idea if pydio will read that there is already configs and everything setup in the folder and not over write what is there and start the setup wizard?
October 16, 201510 yr I thought the whole idea of appdata folders was for folder persistence even in reinstalls... Install another instance of pydio and map it to a copy/duplicate of your existing appdata and see what happens..
October 16, 201510 yr Conceptually it's not difficult to do that ... First, you need to have a complete 2nd server with at least as much space as the primary server in both the array and any additional drives (i.e. cache). Then, you need to have an automated backup that (a) backs up your complete array to the 2nd server; and (b) backs up your cache drive to the cache drive on the 2nd server. You'll need to have a 2nd UnRAID license for the 2nd server at the same level as your primary server's license (Plus, Pro, etc.). And the 2nd server will need to have a different name than the first [e.g. if the first server is called MyMedia the 2nd one could be called MyMedia2]. If the first server was to fail, the failover won't be automatic, but could be very quick. You'd need to ensure the first server was OFF (or at least offline); then go into the 2nd server's Web GUI and change the name to match the primary server's name [e.g. in my example above you'd rename it from MyMedia2 to MyMedia] => otherwise your various network clients wouldn't work with it.
October 16, 201510 yr Author Conceptually it's not difficult to do that ... First, you need to have a complete 2nd server with at least as much space as the primary server in both the array and any additional drives (i.e. cache). Then, you need to have an automated backup that (a) backs up your complete array to the 2nd server; and (b) backs up your cache drive to the cache drive on the 2nd server. You'll need to have a 2nd UnRAID license for the 2nd server at the same level as your primary server's license (Plus, Pro, etc.). And the 2nd server will need to have a different name than the first [e.g. if the first server is called MyMedia the 2nd one could be called MyMedia2]. If the first server was to fail, the failover won't be automatic, but could be very quick. You'd need to ensure the first server was OFF (or at least offline); then go into the 2nd server's Web GUI and change the name to match the primary server's name [e.g. in my example above you'd rename it from MyMedia2 to MyMedia] => otherwise your various network clients wouldn't work with it. This makes sense. I am talking more about an offsite back up at say my parents house. So lets see, I would probably use cashplan or syncthing as there are dockers for those. I haven't used either of these before but I assume you would have to run two instances of which ever one I choose; one for the array and one for the cache drive? On my backup server I would probably want to use s3 wake on lan which I see some people have used with unraid so that isn't a big problem. I think that would be it except for setting up the docker containers on the backup server and my VM. Does this sound right?
October 16, 201510 yr This makes sense. I am talking more about an offsite back up at say my parents house. So lets see, I would probably use cashplan or syncthing as there are dockers for those. I haven't used either of these before but I assume you would have to run two instances of which ever one I choose; one for the array and one for the cache drive? On my backup server I would probably want to use s3 wake on lan which I see some people have used with unraid so that isn't a big problem. I think that would be it except for setting up the docker containers on the backup server and my VM. Does this sound right? It sounds pretty close to right. I'm not sure if you are going to run into problems when you attempt to sync your dockers appdata while docker is running. You might, or might not depending on how Crashplan / syncthing (?) deal with open files.
October 16, 201510 yr The only potential issue is, as noted above, trying to sync a Docker while it's active. You may want to just use a command line script to sync the Docker that you use for all the other backups.
October 17, 201510 yr The only potential issue is, as noted above, trying to sync a Docker while it's active. You may want to just use a command line script to sync the Docker that you use for all the other backups. I've got a script from here somewhere that stops the dockers that are running, copies them all to a set location and then restarted the dockers that were running before, works pretty well... Apologies to the original author, but I can't remember who it was, but I know I didn't write it myself #!/bin/bash appdata=ENTER APPDATA FOLDER LogFile=/mnt/cache/cache_backup.log BackupDir=ENTER BACKUP DESTINATION echo `date` "Starting cache drive backup to " $BackupDir >> $LogFile #Stop plugin services located in /etc/rc.d/ # enter in plugins to stop here, if any # /etc/rc.d/rc.plexmediaserver stop >> $LogFile #stop dockers # find running docker containers declare -a Containers=(`docker ps -q`) # stop running containers for Cont in "${Containers[@]}" do echo `date` " Stopping Container: " $Cont >> $LogFile docker stop $Cont >> $LogFile done #Backup cache via rsync /usr/bin/rsync -avrtH --delete $appdata $BackupDir >> $LogFile ## RESTORE ## /usr/bin/rsync -avrtH --delete $BackupDir $appdata #Start plugin services # enter in plugins to start here, if any # /etc/rc.d/rc.plexmediaserver start >> $LogFile #start dockers previousy stopped for Cont in "${Containers[@]}" do echo `date` " Starting Container: " $Cont >> $LogFile docker start $Cont >> $LogFile done echo `date` "Backup Completed " $BackupDir >> $LogFile # send notification /usr/local/emhttp/webGui/scripts/notify -i normal -s "Cache Drive Backup Completed" -d " Cache Drive Backup completed at `date`"
Archived
This topic is now archived and is closed to further replies.