Add time to filenames generated for dumps.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Thu, 20 Jan 2011 06:22:10 +0530
changeset 492 89f8e4266b1f
parent 491 630719435d16
child 493 096ba514790b
Add time to filenames generated for dumps.
scripts/dumpdb.sh
scripts/profile_schemamigration.sh
scripts/taskapp_schemamigration.sh
--- a/scripts/dumpdb.sh	Thu Jan 20 06:13:40 2011 +0530
+++ b/scripts/dumpdb.sh	Thu Jan 20 06:22:10 2011 +0530
@@ -1,6 +1,6 @@
 #! /bin/bash
 
-pg_dump pytask -U pytask -W > ~/pytaskdbdumps/dbdump`date +%Y%m%d`.dump
-./bin/django dumpscript > ~/pytaskdbdumps/dbdumpscript`date +%Y%m%d`.dump
-./bin/django dumpdata > ~/pytaskdbdumps/dbdumpdata`date +%Y%m%d`.dump
+pg_dump pytask -U pytask -W > ~/pytaskdbdumps/dbdump`date +%Y%m%d%H%M%s`.dump
+./bin/django dumpscript > ~/pytaskdbdumps/dbdumpscript`date +%Y%m%d%H%M%s`.dump
+./bin/django dumpdata > ~/pytaskdbdumps/dbdumpdata`date +%Y%m%d%H%M%s`.dump
 
--- a/scripts/profile_schemamigration.sh	Thu Jan 20 06:13:40 2011 +0530
+++ b/scripts/profile_schemamigration.sh	Thu Jan 20 06:22:10 2011 +0530
@@ -1,8 +1,8 @@
 #! /bin/bash
 
-pg_dump pytask -U pytask -W > ~/pytaskdbdumps/dbdump`date +%Y%m%d`.dump
-./bin/django dumpscript > ~/pytaskdbdumps/dbdumpscript`date +%Y%m%d`.dump
-./bin/django dumpdata > ~/pytaskdbdumps/dbdumpdata`date +%Y%m%d`.dump
+pg_dump pytask -U pytask -W > ~/pytaskdbdumps/dbdump`date +%Y%m%d%H%M%s`.dump
+./bin/django dumpscript > ~/pytaskdbdumps/dbdumpscript`date +%Y%m%d%H%M%s`.dump
+./bin/django dumpdata > ~/pytaskdbdumps/dbdumpdata`date +%Y%m%d%H%M%s`.dump
 ./bin/django schemamigration profile --auto
 ./bin/django migrate profile
 
--- a/scripts/taskapp_schemamigration.sh	Thu Jan 20 06:13:40 2011 +0530
+++ b/scripts/taskapp_schemamigration.sh	Thu Jan 20 06:22:10 2011 +0530
@@ -1,8 +1,8 @@
 #! /bin/bash
 
-pg_dump pytask -U pytask -W > ~/pytaskdbdumps/dbdump`date +%Y%m%d`.dump
-./bin/django dumpscript > ~/pytaskdbdumps/dbdumpscript`date +%Y%m%d`.dump
-./bin/django dumpdata > ~/pytaskdbdumps/dbdumpdata`date +%Y%m%d`.dump
+pg_dump pytask -U pytask -W > ~/pytaskdbdumps/dbdump`date +%Y%m%d%H%M%s`.dump
+./bin/django dumpscript > ~/pytaskdbdumps/dbdumpscript`date +%Y%m%d%H%M%s`.dump
+./bin/django dumpdata > ~/pytaskdbdumps/dbdumpdata`date +%Y%m%d%H%M%s`.dump
 ./bin/django schemamigration taskapp --auto
 ./bin/django migrate taskapp