[HOW TO] Multiple directories one button backup

Share your awesome tips and tricks here.
pcnberlin
Posts: 1
youtube meble na wymiar Warszawa
Joined: Wed Nov 05, 2014 4:05 am

[HOW TO] Multiple directories one button backup

Post by pcnberlin »

Just searched the forum but found only feature-requests for multiple folders backup:

http://forum.asustor.com/viewtopic.php?f=23&t=2422
http://forum.asustor.com/viewtopic.php?f=23&t=2422

I wanted that feature too, so after some hours searching for a solution I found one. The bad news is that the backup-function is a hard-coded binary, so we have to work with what asustor gives us. So here is the fix:

1) Create a new Shared folder, you can name it Backups and hide it from network
2) Create Subfolders named like the folders you want to backup
3) Log in by ssh
4) create a new init-script:

Code: Select all

#!/bin/sh -e
# Mount folders to backup in /volume1/Backps

mount --bind /volume1/FOLDER1/ /volume1/Backup/FOLDER2/
mount --bind /volume1/FOLDER2/ /volume1/Backup/FOLDER2/
mount --bind /volume1/FOLDER3/ /volume1/Backup/FOLDER3/

# Only to avoid some stupid user to delete all data
mount -o remount,ro,bind /volume1/Backup/FOLDER1/
mount -o remount,ro,bind /volume1/Backup/FOLDER2/
mount -o remount,ro,bind /volume1/Backup/FOLDER3/

exit 0
5) Add /Backup/ to the one touch backup from web-interface

Reboot & have fun
A backup a day keeps data recovery away
matock
Posts: 23
Joined: Tue Nov 12, 2013 6:38 pm

Re: [HOW TO] Multiple directories one button backup

Post by matock »

+1

Very thank you pncberlin for your post. Elegant solution, indeed.
I'm a Linux beginner: where and how exactly I put my init-script?

Regards,
matock
AS-202T / 2x WD 4To Red
matock
Posts: 23
Joined: Tue Nov 12, 2013 6:38 pm

Re: [HOW TO] Multiple directories one button backup

Post by matock »

matock wrote:+1

Very thank you pncberlin for your post. Elegant solution, indeed.
I'm a Linux beginner: where and how exactly I put my init-script?

Regards,
matock
I reply myself!
see http://forum.asustor.com/viewtopic.php? ... nit+script
AS-202T / 2x WD 4To Red
Harybald
Posts: 1
Joined: Wed Mar 04, 2015 8:17 pm

Re: [HOW TO] Multiple directories one button backup

Post by Harybald »

1) Create a new Shared folder, you can name it Backups and hide it from network
2) Create Subfolders named like the folders you want to backup
3) Log in by ssh
4) create a new init-script:
You can get score highest marks in Testking Six Sigma Certification dumps exam using cfa course and test king which are stevenson by top certified professionals, Principia College wireless training; both are marvelous in their nature.